fork(1) download
  1. #include <iostream>
  2.  
  3. class Object
  4. {
  5. public:
  6. enum Type {
  7. OT_CIRCLE,
  8. OT_SQUARE,
  9. OT_TRIANGLE,
  10. OT_INVALID
  11. };
  12. };
  13.  
  14. class Circle
  15. {
  16. public:
  17. void DoSomething()
  18. {
  19. auto type = Object::OT_CIRCLE;
  20. std::cout << "Type is " << type << std::endl;
  21. }
  22. };
  23.  
  24. int main()
  25. {
  26. auto circle = Circle();
  27. circle.DoSomething();
  28. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
Type is 0