Dennis Schulz
2005-01-16 00:45:30 UTC
Hi, I have the following problem:
I want to find out the number of the month from given string.
I defined 12 constants as a enum type num:
enum num{Jan=1, Feb=2, Mar=3, Apr=4, May=5, Jun=6, Jul=7, Aug=8,
Sep=9, Okt=10, Nov=11, Dec=12};
now I want to access the number of the month
This is working:
num n = Dec;
There is an error:
num n = static_cast<num>(MyString);
How can I convert it to a num type??
Thank you
I want to find out the number of the month from given string.
I defined 12 constants as a enum type num:
enum num{Jan=1, Feb=2, Mar=3, Apr=4, May=5, Jun=6, Jul=7, Aug=8,
Sep=9, Okt=10, Nov=11, Dec=12};
now I want to access the number of the month
This is working:
num n = Dec;
There is an error:
num n = static_cast<num>(MyString);
How can I convert it to a num type??
Thank you