How do i convert a string to a character array?
We are using a command line prompt like this:
int main(int argc, char **argv)
We put the argv into a string variable like this:
ipstring = argv;
so we could parse the string using string member functions.
We tried an atoi on ipstring but atoi would not work we got:
error C2664: 'atoi' : cannot convert parameter 1 from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' to 'const char *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Any help would be greatly appreciated.