See gcc bug#31456.
The following example works as expected:
#include <iostream>
#include <sstream>
using namespace std;
int main()
{
ostringstream ss("Test",ios::out | ios::app );
cout << "#1: " << ss.str() << endl;
ss << "--";
cout << "#2: " << ss.str() << endl;
return 0;
}
Output:
#1: Test
#2: Test--
No comments:
Post a Comment