SabirSazzad

Stoi function

Mar 17th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.21 KB | None | 0 0
  1. #include<iostream>
  2. #include<string>
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.     char s1[]= "123kj";
  10.     int x;
  11.     x = atoi(s1);
  12.     cout << x+1;
  13.     return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment