`atoi` is evil (not so evil as `printf` and `scanf`, but still). This conversion is better to be made using `std::stringstream`.