Date: Sun, 5 Dec 1999 21:56:32 -0500 From: "Mikhail Evstiounin" <evstiounin@adelphia.net> To: <freebsd-questions@freebsd.org>, "Arcady Genkin" <a.genkin@utoronto.ca> Subject: Re: <sstream> Missing header with g++? Message-ID: <008001bf3f95$81231420$aa353018@evstiouninadelphia.net.pit.adelphia.net>
next in thread | raw e-mail | index | archive | help
sstream is a part of standard for C++ version 3.0. If you use gcc 2.7.2 which is a default compiler for FreeBSD, then you should take into considerentatio that is not up to version 3 - close, but not there. Basically, there are stream ans strstream. The first one is an attachment of stream class to "strings" amd the second one is pretty the same except it uses "char*" (or "C" style) strings instead of "string". If you really like to work with this stuff then I propose to install egcs 2.95.2 as an additional compiler set. -----Original Message----- From: Arcady Genkin <a.genkin@utoronto.ca> To: freebsd-questions@freebsd.org <freebsd-questions@freebsd.org> Date: Sunday, December 05, 1999 5:23 PM Subject: <sstream> Missing header with g++? >Hi. This is kindof offtopic. > >I learned about a class `ostringstream' that allows sending ints and >floats into a string. I then tried finding it in headers, but only >found `strstream'. I proceded to use it, but then I was pointed out >that strstream::str() returns `* char', and therefore is liable to >cause memory leaks. Whereas ostringstrea::str() would return a >`string'. > >I greped around in /usr/include directories on my FreeBSD box, my >Linux box, and my school's Solaris installation, and couldn't find any >reference to ostringstream. > >Does this class or its equivallent exist somewhere? > >Thanks! >-- >Arcady Genkin http://wgaf.dyndns.org >"'What good is my pity? Is not the pity the cross upon which he who >loves man is nailed?..'" (Zarathustra - F. Nietzsche) > > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?008001bf3f95$81231420$aa353018>