File IO

Can anyone tell me what the best io system for text file reading/writing is for opengl applications based on a windows platform when using a non-console win32 application in vc++(bit of a mouthfull).I am trying to read player attributes from text files and edit them and then write them back. Maybe im missing something but ive tried looking for hours on the internet and have found much on the subject.
Any help/links would be appreciated,

Lemmy

For me, I’m using the simple “fscanf” and “fprintf” without any problem

The C++ Standard Library provides a great collection of classes for parsing data from files (see iostream classes particularly ifstream class). I use this exclusively for reading text from files as it is much more functional, elegant, and clean than C stdio. These classes will also read and write binary data. I use C stdio for binary data read/write because I find a heavy performance hit relative to iostreams for such data.

Thanks for the replies, gonna check out the ifstream stuff.

Lemmy.

Hi,

I’m more prefer on FILE <stdio.h> compare to <fstream.h>, b’cause the processing of <stdio.h> is faster than <fstream.h>.