unwanted character on stringstream
-
Hello everyone. I know it is a message board for VC++, but I haven't found one for "plain" C++ here (under linux, i.e.). The following code sequence produces an "A" on stdout, and I cannot figure it out why. PLEASE help ! stringstream os; string buf; os.str(""); buf=os.str(); cout << buf << flush;
-
Hello everyone. I know it is a message board for VC++, but I haven't found one for "plain" C++ here (under linux, i.e.). The following code sequence produces an "A" on stdout, and I cannot figure it out why. PLEASE help ! stringstream os; string buf; os.str(""); buf=os.str(); cout << buf << flush;
why do you pass thru a StringStream ? couldn't you just do :
cout << string("") << flush;
or at least :
String buf = "";
cout << but << flush;what happens if you move the flush outside the line ? (calling
cout.flush()
after)...?
TOXCCT >>> GEII power
[toxcct][VisualCalc] -
Hello everyone. I know it is a message board for VC++, but I haven't found one for "plain" C++ here (under linux, i.e.). The following code sequence produces an "A" on stdout, and I cannot figure it out why. PLEASE help ! stringstream os; string buf; os.str(""); buf=os.str(); cout << buf << flush;
-
why do you pass thru a StringStream ? couldn't you just do :
cout << string("") << flush;
or at least :
String buf = "";
cout << but << flush;what happens if you move the flush outside the line ? (calling
cout.flush()
after)...?
TOXCCT >>> GEII power
[toxcct][VisualCalc]