1 2 3 4 5 6 7 8 9 10 11 12 13
|
enum fields{word, hint, num_fields};
void do_stuff(fields field)
{
switch(field) {
case word: std::cout << "WORD\n"; break;
case hint: std::cout << "HINT\n"; break;
default: std::cerr << "Unexpected value\n"; std::exit(EXIT_FAILURE);
}
}
//...
do_stuff(hint);
| |
Last edited on
ok thanks man
Last edited on