// EXAMPLE std::string sStringAsString = "789"; int iStringAsInt = atoi( sStringAsString.c_str() ); /* SYNTAX atoi( <your-string>.c_str() ) */ /* HEADERS #include <cstring> #include <string> */