0

Why is this code (ideone) not allowed? What would be the workaround?

enum testEnum { e1, e2 };
testEnum te = e1 | e2;

error: invalid conversion from 'int' to 'main()::testEnum'

yizzlez
  • 8,757
  • 4
  • 29
  • 44
Felix Dombek
  • 13,664
  • 17
  • 79
  • 131

0 Answers0