View Full Version : glutInit conflicts with fstream output

07-20-2006, 07:57 PM
I'm using Xcode for research, and want to output results along the way. It seems that if I attempt to write to a file after calling glutInit(), the physical file on the HD is unchanged, but if I subsequently read from the file, during a separate run, the altered data is found. Is there a conflict between glutInit() and fstream with regard to output?

07-21-2006, 01:45 AM
What makes you believe that the 'file on the HD is unchanged'? If a subsequent run of the program reads the altered data, then it was written.

07-21-2006, 03:19 AM
Output may be buffered until you explicitly flush the buffers or close the file. Try calling the flush() method after outputting your data.