c++ clear stream

C++
// EXAMPLE
ostringstream osTest;
osTest << "This is the stream\n";
osTest.clear();
osTest.str("");

/* SYNTAX 
<your-stream-variable>.clear();
<your-stream-variable>.empty();
*/

/* HEADER(S) 
#include <sstream>
*/
Source

Also in C++: