c++ conver to int code example
Example 1: convert stirng to int c++
int thing = std::stoi(string);
Example 2: string to int c++
// Both functions work identically though you'll need to use "#include <string>"
atoi( str.c_str() );
stoi( str );
int thing = std::stoi(string);
// Both functions work identically though you'll need to use "#include <string>"
atoi( str.c_str() );
stoi( str );