a few basic file i/o questions(c++)
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
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.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement