Archived

This topic is now archived and is closed to further replies.

file handling methods

This topic is 4959 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m having difficulties deciding how to read/write data in my games. In my C++ books, I''ve been taught to use ofstreams and ifstreams and what not. Yet, when I look up the source of some C++ games, they use the ol'' FILE* (the C way of handling files right...?). Furthermore, there''re some pieces of code that use both fstream''s and FILE*''s (some MD3 loader on gametutorials.com). I''ve sort of noticed each method''s strengths and weaknesses. (scanf is good stuff, but I can >> my way out of that :-p) Anyone have any recommendations on which file handling method to use? (FILE*/stdio.h/C way? vs. ofstream/ifstream/fstream.h/C++ way?) Have opinions on why one way better than another? Is there one way everyone else is using? I just wanna keep up with the times...or not :-p Thanks in advance.

Share this post


Link to post
Share on other sites