title: Unexpected results with std::ofstream binary write
body: <p>I'm new to C++ std::stream and I'm making some tests. I have this simple code:</p>
  
  <pre><code>int i = 10;
  char c = 'c';
  float f = 30.40f;
  
  std::ofstream out("test.txt", std::ios::binary | std::ios::out);
  if(out.is_open())
  {
      out&lt;&lt;i&lt;&lt;c&lt;&lt;f;
      out.close();
  }
  </code></pre>
  
  <p>As the stream is opened as <code>std::ios::binary</code> I expect in the <code>test.txt</code> file to have the binary representation of <code>i</code>, <code>c</code> and <code>f</code>, but instead I have <code>10c30.4</code>.</p>
  
  <p>Can you please tell me what I'm doing wrong? </p>