fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. typedef enum test{first,second} t_order;
  5.  
  6. int getTestEnumeratorType(int order)
  7. {
  8. t_order order_enum = static_cast<t_order>(order);
  9.  
  10. if(order_enum == first)
  11. return first;
  12. else
  13. return second;
  14. }
  15.  
  16. int main() {
  17. // your code goes here
  18.  
  19. std::cout << getTestEnumeratorType(1);
  20.  
  21. return 0;
  22. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
1