Problem comparing two Enum
Hello,
For my program, I created an enum called Month. One the my function requiert a Month arguments and check if it is the current month. Here my function:
PHP Code:
void CAgenda::SetMonth(enum Month NewMonth)
{
Month curMonth = GetCurrentMonth();
if(NewMonth != curMonth)
{
...Some codes
}
else
{
...Some codes
}
}
I get this error on line if(NewMonth != curMonth) :
error C2677: binary '!=' : no global operator defined which takes type 'enum Month' (or there is no acceptable conversion)
How could I compare the two Month?