hi there. I've been battling with this for a while now, and really need some help!!
I have five files full of 100 numbers each, they are labelled 1.txt, 2.txt up to 5.txt.
I want to read these files in and put them all in an array: files[5][100]
so I can do some stats on the numbers.
aaarrgh! I cant find a neat way to read in, I want it to go like this I think, but obviously the command "infile.open("i.txt")" is bollox and doesn't work so please please please help!!
for(i=0;i<5;i++){
infile.open("i.txt");
counter=0;
while(!infile.eof){
infile>>x;
file[counter]=x;
counter++;
}
infile.close;
}
thanks Kate :confused: