hi,
I'm trying to read a binary file 1 byte at a time using the get() function. I am doing this in a while loop, and supposed the file is ABC. The program runs through the loop four times instead of only 3. How can I fix this so that it ends after it reads the C ? I'm currently using,
while( !myFile.eof() )
myFile.get(ch);
thanx
I'm trying to read a binary file 1 byte at a time using the get() function. I am doing this in a while loop, and supposed the file is ABC. The program runs through the loop four times instead of only 3. How can I fix this so that it ends after it reads the C ? I'm currently using,
while( !myFile.eof() )
myFile.get(ch);
thanx