I know the string is all numbers and I want to convert it to string but VC++ won't let me cast it.
string yea ="432";
int number;
number = (int)yea;
***error C2440: 'type cast' : cannot convert from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' to 'int'. No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called.***
string yea ="432";
int number;
number = (int)yea;
***error C2440: 'type cast' : cannot convert from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' to 'int'. No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called.***
