fork download
  1. #include <iostream>
  2.  
  3. class Art {
  4. public:
  5. enum Color {
  6. Blue,
  7. Red,
  8. Green
  9. }color;
  10. };
  11.  
  12. int main() {
  13.  
  14. Art aC;
  15.  
  16. aC.color = Art::Color::Green;
  17. // or
  18. aC.color = Art::Red;
  19.  
  20. std::cout << aC.color;
  21.  
  22. return 0;
  23.  
  24. }
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
Standard output is empty