// enum example
#include <iostream>
#include <string>
using namespace std;
enum DOW {SUN,MON,TUE,WED,THU,FRI,SAT};
enum MONTH {JAN = 1,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC};
enum PRIME {Two=2,Three,Five=5,Seven=7,Eleven=11,Thirteen=13};
enum {NO, YES};
int main()
{
DOW today = WED;
cout << today << endl;
MONTH month = OCT;;
cout << month << endl;
// PRIME seven = 7; compile error
PRIME seven = static_cast<PRIME>(7);
cout << seven << endl;;
string day[7] = {"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"};
cout << day[WED] << endl;
// for (DOW dow = MON; dow < FRI; ++dow) compile error
for (int i = MON; i <= FRI; i++)
cout << day[i] << ' ';
cout << endl;
// anonymous enum
enum {five = 5, ten = 10};
cout << five + ten << endl;
}