converting a string to an integer c++ code example
Example 1: c++ parse int
std::string s = "10";
int i = std::stoi(s);
Example 2: c++ string to int
atoi( str.c_str() )
std::string s = "10";
int i = std::stoi(s);
atoi( str.c_str() )