fork download
  1. class Inventory {
  2. public:
  3. enum Fruit { APPLE, BANANA, GRAPE, ORANGE };
  4. enum Paint { RED, BLUE, GREEN, ORANGE };
  5. };
  6.  
  7. int main() {
  8. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:4: error: declaration of ‘ORANGE’
prog.cpp:3: error: conflicts with previous declaration ‘Inventory::Fruit Inventory::ORANGE’
stdout
Standard output is empty