for example:
enum Days{Monday = 0,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday //no comma needed for last entry};//now to use this we could have something like this:void PrintDay(Days CurDay){cout << "Today is:" << CurDay << endl;}//no when you call it like so:PrintDay(Monday);//it will print "Today is Monday" to the console
EDIT: just to clarify, all the values are incremented sequentially, so Tuesday would equal 2 etc but if the initial value of Monday is changed to say 10 then Tuesday would equal 11 etc. You can specify values for all of the entries in the enum if you want but most ppl just set the value of the first entry and let the compiler do the rest
[edited by - Spudder on September 25, 2003 6:15:54 PM]