title: C++ mixing printf and cout
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1924530/mixing-cout-and-printf-for-faster-output">mixing cout and printf for faster output</a>  </p>
  </blockquote>
  
  
  
  <p>I'm using Microsoft Visual Studio 6.0.</p>
  
  <p>The following program,</p>
  
  <pre><code>#include "stdafx.h"
  #include "iostream.h"
  
  int main(int argc, char* argv[])
  {
  printf("a");
  printf("b");
  printf("c");
  return 0;
  }
  </code></pre>
  
  <p>produces "abc". </p>
  
  <p>While the following program,</p>
  
  <pre><code>#include "stdafx.h"
  #include "iostream.h"
  
  int main(int argc, char* argv[])
  {
  printf("a");
  cout&lt;&lt;"b";
  printf("c");
  return 0;
  }
  </code></pre>
  
  <p>produces "acb".</p>
  
  <p>What's the problem? Can't I mix cout and printf in the same program?</p>