Using Enum

	enum name {enumeration list} optional varaible(s);
Examples

	enum colour_type {red, green, blue} colour;	//The variable colour can only be assigned the
									values red, green or blue
	(red = 0, green = 1, blue = 2 will be done by the compiler - these are basically const values)


	enum colour_type {red, green = 9, blue} colour;		//red = 0, green = 9, blue = 10


	enum colour_type {red, green, blue};
	colour_type colour;
	colour = green;
USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.