What exactly does "unformatted input function" mean?
<p>After reading <a href="http://www.gamedev.net/topic/641136-stdifstreamread-failing-to-read-all-the-bytes/" rel="nofollow">this post</a> on GameDev.net, I decided to take a gander at the C++ standard. There are several <code>std::istream</code> functions that are described as "unformatted input functions" by the standard (like <code>tellg()</code>, <code>read()</code>, etc.). All this time, I had thought "unformatted input function" meant that text won't be formatted when reading (for example, <code>"\r\n" -&gt; "\n"</code>) when an "unformatted input function" is used (regardless of text mode or binary mode). Apparently, this isn't the case, as the <code>read()</code> method will still convert <code>"\r\n" -&gt; "\n"</code> (if <code>std::ios_base::binary</code> is not specified), despite it being an "unformatted input function."</p>

<p>Now I'm all confused as I obviously don't understand things right. <strong>What exactly does "unformatted input function" mean?</strong> And yes, I've read section 27.7.2.3, paragraph 1, which seems to talk more about handling errors than anything else (though of course, it's possible I'm not properly understanding it, which may be part of the problem).</p>

<p>I've just found the fact that <code>tellg()</code> doesn't take into account the formatting conversions, while <code>read()</code> does, to be rather confusing. To a degree, it makes sense (as <code>tellg()</code> would be O(n) if it did, and if <code>read()</code> didn't, the difference between text/binary modes would be far less significant). But to another degree, it seems... inconsistent. I think part of my confusion and the observed inconsistency likely comes from my apparent misunderstanding of "unformatted input function."</p>
