fork download
  1. #include<iostream>
  2.  
  3. struct Base
  4. {
  5. enum State { ON = 11 , OFF = 22 , STANDBY = 33 };
  6. };
  7.  
  8. struct Derived : Base
  9. {
  10. enum State { ON = ON , OFF = OFF };
  11. };
  12.  
  13. int main()
  14. {
  15. std::cout << Derived::ON << std::endl;
  16. }
  17.  
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
11