I have the following problem. I am reading a very large file into my program (around 15000000 lines). But my !eof() test does not seem to recognise the end of file, which results in my program crashing.
Below the essential bit of the code:
my cout test is reached every single time, even tho i should not be any bigger than 25000000.
ifstream inEdges ("homogEdges.dat");
vector<unsigned long long> Vertex;
cout<<"this should not happen as the file is smaller"<<endl;
The file i am reading in looks like this:
etc. (for ~12000000 lines)
obviously eof() cannot handle the file size? Is there any other way of testing for the end of file, as I don't want to do a for loop manually entering the amount of lines in the file every single time.