title: The Str method of Stringstream will not work. (concatenation of different types) (C++)
body: <p>I'm brand new to C++ and I am trying to get a simple program up and running.</p>
  
  <p>I'm using the Eclipse IDE ( C++ Version ) on a Windows System.</p>
  
  <p>I am trying to concatenate an output statement, it will combine numbers and strings.</p>
  
  <p>I know in Java, this was automatically done with the System.out.println() method.</p>
  
  <p>What I was able to research was a nice way of implementing this in C++ is to use the string stream method.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include "Person.h"
  </code></pre>
  
  <p>...</p>
  
  <pre><code>string simpleOutput(){
    stringstream ss;
  
    int a  = 50; // for testing purposes 
    int b = 60;
    string temp = "Random";
    ss &lt;&lt; a &lt;&lt; b &lt;&lt; temp;
    return string output = ss.str();
  
  
  }
  </code></pre>
  
  <p>When I try compiling this code is get the following: "Method "str" could not be resolved.</p>
  
  <p>I have yet to find a solution on any webpage.
  T
  Thank you!</p>