I am using one ostringstream several times in my program. I would like to clear it after every use..., but how?
I am using one ostringstream several times in my program. I would like to clear it after every use..., but how?
stream.str("");
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
Aside from being a function, basic_ostringstream::str() returns basic_string, not basic_string &, so this won't work.Originally Posted by Thantos
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law