I've read on several websites that in order to use stringstream more than once I'm supposed to use
stringstream ss;
ss.str("");
PHP Code:
http://www.gamedev.net/community/forums/viewreply.asp?ID=516546
though, it doesn't seem to work for me
Code:
stringstream streamstr;
streamstr << "TM" << GalilInternalClock;
string sendstring;
streamstr >> sendstring;
streamstr.str(""); //suuposed to clear streamstr
streamstr << "DR" << GalilDataRecordFrequency;
streamstr >> sendstring;
//and sendstring is still "TM1000" for some reason!!!
What am I doing wrong?
Thanks.