seek bug in stringstream?

Lars Gullik Bjønnes larsbj@lyx.org
Fri Apr 14 10:50:00 GMT 2000


Benjamin Kosnik <bkoz@cygnus.com> writes:

|         ostringstream ost;
|         cout << ost.tellp() << endl;
| 
| 
| Take a look at 27.7.1.3, in particular the bits about seekoff.

I am still wondering about this issue, and the issue does not seem any
clearer since my first question.

I belive that:
	ostringstream ost;
	cout << ost.tellp() << endl;
	ofstream ofs("tmp");
	cout << ost.tellp() << endl;
	FILE * fil = fopen("tmp2", ...);
	cout << ftell(file) << endl;

should all yield the same value. I also believe that this value should
be 0. And have so far not heard any good reason to the contrary.

Isn't there any definite ruling on this issue? In the standard, POSIX
whatever? Or is this completely implementation defined?

	Lgb


More information about the Libstdc++ mailing list