// headers #include <sstream> // syntax <stringstream-name>.clear(); <stringstream-name>.str(); // example ostringstream oTestStrm; oTestStrm << "Hello World!"; oTestStrm.clear(); oTestStrm.str("");