W
William Payne
How do you get rid the contents in a std::stringstream? I'm using one in a
for loop to format some status messages which I print to the screen. The
stringstream member function clear() only clears flags (bits) in the stream,
right? I solved it by declaring the stringstream inside the loop body even
though I have need of another stringstream just after the loop. So for each
iteration the constructor of the stringstream will be executed. Is this how
I should go about it? *looks at sprintf()*
/ WP
for loop to format some status messages which I print to the screen. The
stringstream member function clear() only clears flags (bits) in the stream,
right? I solved it by declaring the stringstream inside the loop body even
though I have need of another stringstream just after the loop. So for each
iteration the constructor of the stringstream will be executed. Is this how
I should go about it? *looks at sprintf()*
/ WP