Re: converting string into integer




int a = atoi(argNum);

But I got errot message :error: cannot convert `std::string' to `const
char*' for argument `1' to `int atoi(const char*)'

You can use argNum.c_str() to solve this problem.
I think you are a newer to C++. This is a very basic problem. You can
find the answer in many books very easily.

.