Skip to content

Instantly share code, notes, and snippets.

@hernad
Created November 25, 2010 23:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hernad/716071 to your computer and use it in GitHub Desktop.
Save hernad/716071 to your computer and use it in GitHub Desktop.
enum dilema
enum Oznaka {A, B, C, D, E};
..
Oznaka ozn;
cout << "unesi oznaku:"
// ovo je bitno jer cin ne zna raditi direktno sa enum-om
cin >> (int) ozn;
switch (ozn) {
case A:
cout << "A" ;
break;
case B:
cout << "B" ;
... itd itd ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment