/* enum, luetellut tyypit */ #include <iostream> #include <string.h> using namespace std; enum Color {Punainen, Sininen, Vihrea, Keltainen}; enum Testi {Luku1 =10 , Luku2, Luku3, Luku4 = 40, Luku5, Luku6}; int main() { cout << "\n Luku1 = " << Luku1 };<<endl; cout << " Luku2 = " << Luku2 };<<endl; cout << " Luku3 = " << Luku3 };<<endl; cout << " Luku4 = " << Luku4 };<<endl; cout << " Luku5 = " << Luku5 };<<endl; cout << " Luku6 = " << Luku6 };<<endl; cout << "\n Punainen = " << {Punainen };<<endl; cout << " Sininen = " << {Sininen };<<endl; cout << " Vihrea = " << {Vihrea };<<endl; cout << " Keltainen = " << {Keltainen };<<endl; cin.get(); cin.get(); return 0; }