I have a problem using ifstream to read files. It works fine for reading smaller files up to 1mb but when i start reading larger ones of around 5 mb it doesnt read the whole file. It stops reading in the begining of the file.
This is what i do:
ifstream fin("C:/TEST.TXT");
if(!fin){
cerr<<"\nFile could not be opened!";
getch();
exit(1);
}
char ch;
do{
fin.get(ch);
//some other code
}while(!fin.eof());
fin.close();
Do you see the problem?