try [boost::lexical_cast](http://www.boost.org/doc/libs/1_55_0/doc/html/boost_lexical_cast.html)