fork download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. //declaring a string containing '25'
  9. string myint = "25";
  10. //Convert it into an integer
  11. int twentyfive = stoi(myint);
  12.  
  13. //Will print out '34'
  14. cout << twentyfive + 9 << '\n';
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0s 3412KB
stdin
Standard input is empty
stdout
34