title: Appending and returning a string
body: <p>I've got a class and one of its functions is to type out some information with the help of previous functions.</p>
  
  <pre><code>string printResult()
  {
      string result;
  
      cout&lt;&lt;"\n"&lt;&lt;getName()&lt;&lt;" bla bla bla "&lt;&lt;getPoints()&lt;&lt;" blabla.";
  
      return result;
  }
  </code></pre>
  
  <p>Where getName and getPoints are obviously those other functions.</p>
  
  <p>My question is:
  How should I redo/change this part </p>
  
  <pre><code>cout&lt;&lt;"\n"&lt;&lt;getName()&lt;&lt;" bla bla bla "&lt;&lt;getPoints()&lt;&lt;" blabla.";
  </code></pre>
  
  <p>to become a string of its own which I can return,with this exact content?</p>