fork(1) download
  1. #include <iostream>
  2. #include <string>
  3. #include <boost/lexical_cast.hpp>
  4. int main()
  5. {
  6. std::string str = "10";
  7. int n = boost::lexical_cast<int>(str);;
  8. n *= 10;
  9. str = boost::lexical_cast<std::string>(n);
  10. std::cout << str << '\n';
  11. }
  12.  
Success #stdin #stdout 0s 2864KB
stdin
Standard input is empty
stdout
100