title: How to append content to stringstream type object?
body: <p>i am using object of stringstream as follows:</p>
  <pre><code>#include&lt;iostream&gt;
  #include &lt;istream&gt;
  
  using namespace std;
  int main()
  {
      sting str=&quot;my.string&quot;;
  
      std::stringstream message(&quot;HI this is firet line from initialization&quot;);
  
      message &lt;&lt; &quot; second line &quot; &lt;&lt; &quot; Continuing second line&quot;;
  
      message &lt;&lt; &quot;, Add values: &quot;;
  
      message &lt;&lt; str ;
  
  
      std::cout&lt;&lt;&quot;message value is :&quot;&lt;&lt;message.str()&lt;&lt;std::endl;
  
      return 0;
  }
  </code></pre>
  <p>with above code it gives an error as follows:</p>
  <pre><code> error: variable 'std::stringstream message' has initializer but incomplete type
  </code></pre>
  <p>above error is resolved once i added the &quot;#include &quot; header file. but when i printed the value of message. it is getting incomplete. i.e. value i got of message is as follows:</p>
  <p>message value is :  second line  Continueing second linetion , Add values: my.string</p>
  <p>any suggestion on why first line is removing in output?
  Thanks in advance</p>