-
If
Coloris something that is specific to justCars then that is the way you would limit its scope. If you are going to have anotherColorenum that other classes use then you might as well make it global (or at least outsideCar). -
It makes no difference. If there is a global one then the local one is still used anyway as it is closer to the current scope. Note that if you define those function outside of the class definition then you’ll need to explicitly specify
Car::Colorin the function’s interface.