Hi,
Use std::istringstream or BOOST lexical_cast.
http://www.boost.org/libs/conversion/lexical_cast.htm
HTH, --Eljay