title: How is std::fstream with both in and out supposed to work?
body: <p>I've just started wondering - how is actually <code>std::fstream</code> opened with both <code>std::ios::in</code> and <code>std::ios::out</code> actually supposed to work? What should it do? Write something to (for example) an empty file, then read... what? Just written value? Where would the file &quot;pointer&quot;/&quot;cursor&quot; be? Maybe the answer's already out there but I just couldn't have found it.</p>