String in INT in CPP

string str1 = "3434";
int num = stoi(str1);
Coder OM