title: How does C++ interpret a cout with a '+' in it?
body: <p>I've been moving back and forth with Java/C++ so I messed up with my console output and accidentally wrote lines like:</p>
  
  <pre><code>cout &lt;&lt; "num" + numSamples &lt;&lt; endl;
  cout &lt;&lt; "max" + maxSampleValue &lt;&lt; endl;
  </code></pre>
  
  <p>Each of which gave me bits and pieces of other strings I had in my program. I realize my mistake now, but what was C++ interpreting those lines as so that they output different parts of different strings in my program?</p>