I have made 7 functions and wanted to use an enumeration in a switch.
The problem is that, i want the enumeration variables to be with the same name as the functions. Both are global, so how am I supposed to trick the computer and change the naming scheme? I used for example a start(); function and if i use enum{start} this won't work. If i use for example enum{start1} this works, but looks awful. Any help?
enum class Functions { start, other_start, last_start };
EDIT: Or if your compiler does not support scoped enumerations you can place your enum in some namespace and use the nested name specifier everywhere in the code.