fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. enum class DrawMode : int {
  5. foo = 0,
  6. bar = 1
  7. };
  8.  
  9. int main() {
  10. DrawMode test = DrawMode::foo;
  11.  
  12. if (int(test)) {
  13. printf("bar");
  14. } else {
  15. printf("foo");
  16. }
  17.  
  18. // your code goes here
  19. return 0;
  20. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
foo