Guest User

Untitled

a guest
Jan 6th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. #include<iostream>
  2. enum A : const int{ // is this the same as enum A : int ?
  3. no = 0,
  4. si
  5. };
  6.  
  7. int main(){
  8. A a;
  9. a = si; // is asignable
  10. a = no; // twice
  11. std::cout << (int)a << std::endl; // prints '0'
  12. return 0;
  13. }
Add Comment
Please, Sign In to add comment