can any one tell me how to clear the content of the stringstream..? i tried the following but it didnt work.
stringstream ss;
ss<<"bala"<<"murugan";
cout<<ss.str(); //Output balamurugan
ss.str().clear();
ss<<" hi";
cout<<ss.str();
// output is balamurugan hi
my required output is " hi" alone.. Pls tell me