À
Àî°×
hi all:
I want erase a stringstream' content for input new data to it.
example:
std::stringstream stm;
stm<<"this is a string";
std::cout<<stm.str();
// here print:this is a string
// do something here of the stm, i don't know .....
stm<<"not a string";
std::cout<<strm.str();
// I want print "not a string", not "this is a string not a string"
I want erase a stringstream' content for input new data to it.
example:
std::stringstream stm;
stm<<"this is a string";
std::cout<<stm.str();
// here print:this is a string
// do something here of the stm, i don't know .....
stm<<"not a string";
std::cout<<strm.str();
// I want print "not a string", not "this is a string not a string"