Sign in to follow this  

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

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

This topic is 3461 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this