http://www.cplusplus.com/ is a decent source of c++ info. Look up
atoi. Then recall that string objects have a .c_str() member function that will return a c-style string (null-terminated array of characters).
There is a function to go the other way, but I forget it.
Debugging is related to the compiler you are using. What is your compiler?