how do you clear or empty an ostrstream?
Code:#include <windows.h> #include <strstream> using namespace std; void main(){ ostrstream oss; oss << "3.14159265359" << ends; MessageBox(0, oss.str(), "", 0); // now clear out the stream so a new stream can be written oss << "1.41421356237" << ends; MessageBox(0, oss.str(), "", 0); }




Reply With Quote