Yes, atoi() is a C function, so it doesn't know about std::string. The error is telling you exactly what's wrong. You'll need to use std::string's compatibility method, c_str().