fork download
  1. #include <iostream>
  2. #include <boost/lexical_cast.hpp>
  3. #include <cassert>
  4.  
  5. int main()
  6. {
  7. std::string str = "99999999999.999999";
  8. double back = boost::lexical_cast<double>( str );
  9. std::string str2 =boost::lexical_cast<std::string>( back );
  10. assert(str == str2);
  11. }
Runtime error #stdin #stdout 0.01s 2816KB
stdin
Standard input is empty
stdout

Standard output is empty