How to append content to stringstream type object?
<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="my.string";

    std::stringstream message("HI this is firet line from initialization");

    message &lt;&lt; " second line " &lt;&lt; " Continueing second line";

    message &lt;&lt; ", Add values: ";

    message &lt;&lt; str ;


    std::cout&lt;&lt;"message value is :"&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 "#include " 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>
