string str1 = "45";
string str2 = "3.14159";
string str3 = "31337 geek";
int myint1 = stoi(str1); // type of explicit type casting
int myint2 = stoi(str2); // type of explicit type casting
int myint3 = stoi(str3); // type of explicit type casting
/* Result
45
3
31337
*/