This is simple but mighty annoying if you’re not used to C++, like I am. I am a C# coder, but working with C++ at the moment and sometimes it can get confusing. So I am writing this to remember it for future usage.
int atoi ( const char * str );
str : string containing number at the beginning
i = atoi (num.c_str());