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