Thread View: gnu.g++.lib.bug
1 messages
1 total messages
Started by Tan Chee Weei
Thu, 12 Nov 1992 06:07
Problem with strstream
Author: Tan Chee Weei
Date: Thu, 12 Nov 1992 06:07
Date: Thu, 12 Nov 1992 06:07
21 lines
1303 bytes
1303 bytes
Previously using gcc-2.2.2 and libg++ 2.1, I was able to do the following: strstream msg; msg << ' ' << "abc"; Right now I've upgraded to gcc-2.3.1 and libg++ 2.2. The ' ' character is giving problems: undefined strstream operator << () msg << ' '; // can't find << operator msg << "abc" << ' '; // ok Explicitly casting msg to an ostream& works as well. I noticed that iostream derives from ios and not istream and ostream like in the AT&T implementation, and it uses defines istream and ostream conversion functions. I can understand why the second case works since the first << returns an ostream &. It seems, for the first case, that there is a problem in implicitly converting msg to an ostream & so that the correct << operator may be matched?? Is there a fix for it? CW
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads