Skip to main content
deleted 12 characters in body
Source Link
A.B.
  • 16.5k
  • 5
  • 64
  • 67
typedef enum {Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday, Last = Saturday} Day;
void DoSomething(Day day){
   // if day <=< Last ...
}
typedef enum {Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday, Last = Saturday} Day;
void DoSomething(Day day){
   // if day <= Last ...
}
typedef enum {Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday, Last} Day;
void DoSomething(Day day){
   // if day < Last ...
}
Source Link
A.B.
  • 16.5k
  • 5
  • 64
  • 67

typedef enum {Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday, Last = Saturday} Day;
void DoSomething(Day day){
   // if day <= Last ...
}