Hello there!
I recently used an enum for the first time and I haven't figured out a solution for my problem. What I tried to do was retrieve the actual computer's date, get the month in a string and then turn into a number (through the enum) but I can't find a way to do so, since everytime I try printing the month I get 0. I tried the following:
Thanks in advanceCode:enum Months { dummy, Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec }; //dummy is just a temporary solution for 0 string date = getDate(); //"Dec/2013" string month = getMonth_str(date); //month = "Dec" cout << month; //output: 0; Shouldn't it be 12?