cannot find strstream in /usr/include/c++/3.3.3

Discussion in 'C++' started by derek, Sep 28, 2004.

  1. derek

    derek Guest

    Hi,

    I'm trying to compile someone's code which uses ostrstream. I know
    it's declared in file strstream, but I can't find this file in the
    /usr/include/c++/3.3.3 directory. There is a file called sstream, but
    it doesn't work when I include sstream.

    Do you guys know what's wrong?

    Thanks in advance.
    Derek
    derek, Sep 28, 2004
    #1
    1. Advertising

  2. derek wrote:
    > I'm trying to compile someone's code which uses ostrstream. I know
    > it's declared in file strstream, but I can't find this file in the
    > /usr/include/c++/3.3.3 directory. There is a file called sstream, but
    > it doesn't work when I include sstream.
    >
    > Do you guys know what's wrong?


    Try switching to new ones instead of old string streams. The old ones
    have been deprecated. Actually, deprecation doesn't necessarily mean
    obsoleteness. You could ask in gnu.g++.help for more information on
    where 'ostrstream' has gone.

    V
    Victor Bazarov, Sep 28, 2004
    #2
    1. Advertising

  3. derek

    Old Wolf Guest

    (derek) wrote in message news:<>...
    > Hi,
    >
    > I'm trying to compile someone's code which uses ostrstream. I know
    > it's declared in file strstream, but I can't find this file in the
    > /usr/include/c++/3.3.3 directory. There is a file called sstream, but
    > it doesn't work when I include sstream.



    There is "strstream" in the subdirectory "backward". Just include
    it normally:

    #include <strstream>

    and everything will work.
    Old Wolf, Sep 29, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Salerno
    Replies:
    30
    Views:
    1,941
    Stephan Kuhagen
    Aug 10, 2006
  2. Yves Dorfsman

    #!/usr/bin/env python vs. #!/usr/bin/python

    Yves Dorfsman, May 2, 2008, in forum: Python
    Replies:
    27
    Views:
    1,974
    Tim Roberts
    May 10, 2008
  3. TsanChung
    Replies:
    4
    Views:
    1,208
    TsanChung
    Sep 21, 2008
  4. shankha
    Replies:
    0
    Views:
    663
    shankha
    May 5, 2009
  5. anne001
    Replies:
    1
    Views:
    402
Loading...

Share This Page