Quick Question on std::string

Write here if you have problems with your C++ source code

Moderator: Board moderators

Post Reply
New poster
Posts: 25
Joined: Wed Jun 05, 2002 4:55 am
Location: London, ON, Canada

Quick Question on std::string

Post 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


New poster
Posts: 45
Joined: Fri Oct 19, 2001 2:00 am

Try std::strstream

Post by suman »

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

Post Reply

Return to “C++”