title: C++ string not printed
body: <p>I have the next code:</p>
  
  <pre><code>void addContent ( const std::string&amp; message ) {
     std::string newMessage;
  
     for ( int i = 0, remainder = textCapacity - currentText; i &lt; remainder; i++ ) {
        newMessage[i] = message[i];
        std::cout &lt;&lt; newMessage; //here nothing is printed
     }
  }
  </code></pre>
  
  <p>But nothing is printed.</p>
  
  <p>Only if I change <code>newMessage</code> to <code>newMessage[i]</code> everything is good. And I dont undestand why?</p>