Jump to content
  • Advertisement
Sign in to follow this  
godsenddeath

a few basic file i/o questions(c++)

This topic is 3704 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

ok, i have a couple questions about c++ file i/o when using the << operator, it reads till the next white space right? what about in binary mode? and what about the get() method? does this read a single char in character mode, and a single byte in binary? thanks

Share this post


Link to post
Share on other sites
Advertisement
Binary mode does not affect how the underlying data stream is presented to your application. If you ask for a formatted integer using the >> operator, then that is exactly what you get.

Binary/text mode is mostly, of not only, about translating special characters like Windows' two consecutive new line characters to the common single character '\n' code point. Different translations exists for other operating systems, as some systems use different character combinations for special characters.

Share this post


Link to post
Share on other sites
How data is given to you depends only on what types you read, yes, and what functions you use to read them. Binary or text mode is orthogonal to that concept.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!