i'm trying to convert a string into an integer by using atoi() function. but it gives me an error:
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
i've looked up how to use atoi() and i'm positive i'm using it right can someone offer some insight?
string b; //b is given a value inbetween these two commands by way of //a loop. tree.Insert(atoi(b));
thanks for any help