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