Hi,
I'm trying to convert a string to an enum data type, and am having a bit of a hard time to do it.
Basically I have
enum MyType{
Saw, Saw2, Saw3
};
more over I try to read from the console:
MyType m;
cout << "What's the movie name?" << endl;
cin >> m;
I want to force the possibility of having this string with alphanum data...
But can't seem to convert it to the enum:
Error 1 error C2440: 'type cast' : cannot convert from 'std::string' to 'MyType'
Oh right, I changed all those data types to include the info on the web. I really want to convert the string to an Enum :)
thanks,
Nuno