fork(1) download
  1. #include <iostream>
  2.  
  3.  
  4. using namespace std;
  5.  
  6.  
  7. class A {
  8. public:
  9. enum Mode {ModeA, ModeB, ModeC};
  10.  
  11. // ... // other methods, constructor etc
  12.  
  13. void setMode(Mode m) {
  14. mMode = m;
  15. }
  16.  
  17. private:
  18. Mode mMode;
  19. };
  20.  
  21. int main(int argc, char **argv) {
  22. A a;
  23. a.setMode( (A::Mode) (A::ModeA | A::ModeC ));
  24.  
  25. return 0;
  26. }
Success #stdin #stdout 0s 3336KB
stdin
Standard input is empty
stdout
Standard output is empty