fork(1) download
  1. #include<bits/stdc++.h>
  2. #include<string.h>
  3. #include<stdlib.h>
  4. using namespace std;
  5.  
  6. int main() {
  7.  
  8. string str1="10";
  9. int i=0;
  10. while ( str1[i]!='\0' )
  11. {
  12. i++;
  13. }
  14. //string str2=str1.substr(i+1,str1.length());
  15. //cout << str2;
  16. int k;
  17. k = stoi(str1);
  18. cout << k;
  19. return 0;
  20. }
Success #stdin #stdout 0s 3272KB
stdin
Standard input is empty
stdout
10