Created
August 14, 2015 07:32
-
-
Save derofim/e168bbe33570601805a6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| enum class Color : char { RED, GREEN, BLUE }; | |
| enum class Mark { ONE, TWO, THREE, FOUR, FIVE }; | |
| Color redColor = Color::RED; | |
| Mark fiveMark = Mark::FIVE; | |
| int main() | |
| { | |
| cout << sizeof ( Color ) << endl; // Вывод: 1 | |
| cout << sizeof ( redColor ) << endl; // Вывод: 1 | |
| cout << sizeof ( Mark ) << endl; // Вывод: 4 | |
| cout << sizeof ( fiveMark ) << endl; // Вывод: 4 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment