seek bug in stringstream?
Lars Gullik Bjønnes
larsbj@lyx.org
Sat Apr 1 00:00:00 GMT 2000
This program:
#include <iostream>
#include <sstream>
#include <strstream>
int main()
{
using namespace std;
ostringstream ost;
cout << ost.tellp() << endl;
ost << "Hello";
cout << ost.tellp() << endl;
ost << " World!";
cout << ost.tellp() << endl;
ostrstream ost2;
cout << ost2.tellp() << endl;
ost2 << "Hello";
cout << ost2.tellp() << endl;
ost2 << " World";
cout << ost2.tellp() << endl;
}
Gives this result:
134538556
134558617
134558624
0
5
11
Is this correct behaviour?
Lgb
More information about the Libstdc++
mailing list