On Mon, Sep 24, 2001 at 06:52:58PM -0400, David Scriven wrote:
> The code looks something like this:
>
> char output_array[1024];
> char something[10];
> ostrstream oa(output_array, 1024);
> oa.write(something); // which moves the pointer to 10
You meant oa.write(something, 10); here, right?
> oa.seekp(20L,ios::beg);
> cout << " Pointer posn : " << oa.tellp() << endl;
>
> gives:
> Pointer posn : 10
>
> Any ideas?
libstdc++ <= 2 is not fully standard compliant.
You get the same results with egcs 1.1.2 or gcc 2.95.x.
It will allow you just to seekp below the string length (e.g. oa.seekp(5L,
ios::beg); in the above example would work).
With libstdc++-v3 (part of GCC 3.x, completely rewritten) this works
properly.
Jakub
_______________________________________________
Seawolf-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/seawolf-list