I'm having a problem reading an integer from a file. As for my knowledge it should work. Can you tell me what have I done wrong here?
int fileCount = 0; ifstream listFileStream ( fileName ); if ( listFileStream.is_open() ) { listFileStream >> fileCount; cout << fileCount; } It only prints 0 even though the first line of the file is 28.