#include <iostream>

using namespace std;

enum color {red, green, blue}; // Type declaration

int main()
{
	color c;
	int i;
	
	cout << "Please select a color" << endl;
	cout << "0...red" << endl;
	cout << "1...green" << endl;
	cout << "2...blue" << endl;
	cin >> i;   // enums can not be read directly
	c = static_cast<color>(i);
	
	switch (c) {
		case red: 
		   cout << "Red selected!" << endl;
		   break;
		// ...
	}
	return 0;
}
