Thread: file IO
View Single Post
Old Mar 22nd, 2008, 6:42 PM   #3
1cookie
Newbie
 
Join Date: Mar 2008
Posts: 2
Rep Power: 0 1cookie is on a distinguished road
Re: file IO

Quote:
Originally Posted by Ancient Dragon View Post
>>Why is this number appearing and for what reason??
Because you are using feof() incorrectly on line 10. Rearrange your program like below. You rarely, if ever, have to use feof().
while(file_in >> r[i]) 
{ 
 cout<<r[i]<<endl; 
i++; 
}

thanks....
1cookie is offline   Reply With Quote