Advertisement
Guest User

Untitled

a guest
Aug 4th, 2021
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.22 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. enum Foo{
  4.     A, B, C, D, E
  5. };
  6.  
  7. int main(){
  8.     Foo bar = Foo::A;
  9.     switch(bar){
  10.     case Foo::A:
  11.         std::cout << "bar has the value A" << std::endl;
  12.         break;
  13.     }
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement