Could be nice to have user-defined enums
enum RESULT {
SUCCESS=0,
FAILURE=1,
UNKNOWN=2
}
That can be used inside switch-case as literals:
switch (result) {
case SUCCESS: ...
case FAILURE: ....
case UNKNOWN: ...
}
And as parameters to functions
void foo(RESULT r) {
if (r == SUCCESS) ...
}
Could be nice to have user-defined enums
That can be used inside switch-case as literals:
And as parameters to functions