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

D

derek

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
 
V

Victor Bazarov

derek said:
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
 
O

Old Wolf

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top