I'd like to flush the savegame to disk. That way the file won't be lost or corrupted if the power goes out soon after saving. Just trying to make the code more bulletproof.
How would you interpret the following docs?
Stream I/O, has links to fopen, fclose, and fflush:
If I understand them correctly, I can just call fclose. After all, it releases windows file handles, which I would assume flushes OS write buffers to disk..
But I may need to open the file with "wbc" instead of "wb" =OR= link the "commit to disk" obj file, and call fflush before fclose.
Right now, I just call fopen "wb", and fclose.
Thoughts? Comments? Suggestions?