Jump to content
  • Advertisement

Archived

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

andyZER0

file handling methods

This topic is 5172 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
Advertisement
Personally, I don''t really see the difference.

But, I recommend you go straight C++ and use STL. (Which would mean use streams)

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!