I can't believe I can't figure this out. I'm just trying to read from a file, a one line list of numbers. But if I have 3 numbers in the list, it will read the first two fine, but for some reason it doesn't read the third. I've tried switching up the order of things and nothing has helped. What am I doing wrong?
Code:
inputfile>>temp;
while (!inputfile.eof())
{
cout<<temp<<' ';
amountof++; //Determining how many numbers there are
inputfile>>temp;
}
-Elburn