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,639
  • 4
  • 28
  • 44
Felix Dombek
  • 12,597
  • 15
  • 71
  • 123

0 Answers0