Archived

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

andyZER0

file handling methods

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