Why do you use typedef when declaring an enum in C++?
In C, declaring your enum the first way allows you to use it like so: If you use the second style, you’ll be forced to declare your variable like this: As mentioned by others, this doesn’t make a difference in C++. My guess is that either the person who wrote this is a C programmer … Read more