How to make strings equal?
<p>In this a and "v1" does not come out to be equal...although the content is same..can someone help in suggesting a way such that a comes out to be equal to "v1"</p>

<pre><code>int main()
{
    stringstream s;
    string a;
    char *c="v1";
    s&lt;&lt;c;
    a=s.str();
    cout&lt;&lt;a;
    int i=strcmp(a, "v1");
    cout&lt;&lt;"i="&lt;&lt;i;
}
</code></pre>

<p>On comparing a and "v1" do not come out to be equal...please suggest some way such that i may make a to be equal to "v1"...the end goal is to make a to be equal to "v1".</p>
