OK, so what is it that you're trying to do? If you don't tell us what your end goal is other than just to store data, we can't guess your intentions, especially since your syntax for declaring arrays was off the mark, and you said you don't know what you're doing with files.
I'm guessing you want us to write some code. Here's a really bad way to read from a file like yours and store the items sequentially in a vector:
Code:
#include <iostream>
#include <fstream>
#include <vector>
int main(int argc, char *argv[])
{
bool bLoop = true;
unsigned int i,j;
int iRet = 0;
double d;
std::vector<double> vList;
std::ifstream *input;
if(argc < 2)
{
std::cerr << "Usage: " << argv[0] << " <file>" << std::endl;
return 1;
}
input = new std::ifstream(argv[1],std::ifstream::in);
if(input->is_open())
{
do
{
*input >> d;
if(input->good())
{
vList.push_back(d);
}
else bLoop = false;
}while(bLoop);
for(i=0;i<vList.size()/3;i++)
{
for(j=0;j<3;j++)
{
std::cout << vList[(i*3)+j] << " ";
}
std::cout << std::endl;
}
}
else
{
std::cout << "File could not be opened." << std::endl;
iRet = 2;
}
delete input;
return iRet;
}