Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- enum A : const int{ // is this the same as enum A : int ?
- no = 0,
- si
- };
- int main(){
- A a;
- a = si; // is asignable
- a = no; // twice
- std::cout << (int)a << std::endl; // prints '0'
- return 0;
- }
Add Comment
Please, Sign In to add comment