Page 1 of 1

Quick Question on std::string

Posted: Tue Nov 12, 2002 5:45 am
by littledump
how do i go about converting a std::string to an int or float?

as well is there an equiviant to sprintf for the c++ std::string object?

any other information on std::string would be very helpful as well.

i havent used it very much & could use as much info as possible

thanks

Try std::strstream

Posted: Tue Nov 12, 2002 6:25 pm
by suman
Hi,
As you have used sprintf, you can use strstream in a similar way.

C - C++
--------------------------------------------------
printf,scanf standard I/O cout, cin
sprintf,sscanf string I/O strstream object


try any stl documents for the use.

- Suman