The underlying problem is the usage of code-polluting paamayim nekudotayim instead of the ..
Name:
Anonymous2019-01-04 13:52
C: enum bepis { sweet, sour }; void f(enum anus, ...); this is valid: f(sour); And if you also have enum candy { sweet }; you will get an error Thanks C!
Name:
Anonymous2019-01-05 5:17
>>3 The solution was right in the article CategoryNameEnumValue, no need to use same identifier and being retarded.
Name:
Anonymous2019-01-05 8:53
Artificial problem. When do you actually use same identifier for two enums?
This is an extremely useful feature that prevents bugs.
it's too much typing
You mean you don't have autocomplete? In 2019?
Name:
Anonymous2019-01-06 10:19
C: enum Color {BronzeColor,SilverColor,GoldColor};
enum Bullion{SilverBullion,GoldBullion,PlatinumBullion}; Color col1=BronzeColor; if ((col2==SilverColor) || (col2==GoldColor)) int carcolor=SilverColor;
C++: enum class Color //C++11 scoped enum {Bronze,Silver,Gold};
enum struct Bullion //C++11 scoped enum {Silver, Gold,Platinum }; Color col1=Color::Bronze; if ((col2==Color::Silver) || (col2==Color::Gold)) int carcolor=static_cast<int>(Color::Silver);