fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.  
  5. class Test{
  6.  
  7. public:
  8.  
  9. enum Mode {mode1, mode2};
  10.  
  11. Test(){};
  12.  
  13. void doIt(Mode in){
  14. cout << "Enum func\n";
  15.  
  16. }
  17.  
  18. void doIt(int in){
  19. cout << "int func\n";
  20.  
  21. }
  22.  
  23. };
  24.  
  25. int main() {
  26. Test t;
  27. t.doIt(22);
  28. t.doIt(Test::mode1);
  29. return 0;
  30. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
int func
Enum func