Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <cstdlib>
- using namespace std;
- int main(int argc, char* argv[])
- {
- string n;
- n=argv[1];
- int nn=n.find(".");
- string num(n,0,nn);
- int int_n;
- int_n = atoi(num.c_str());
- cout <<"strin :: " << num << " int:: " << int_n << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment