Created
August 14, 2015 07:31
-
-
Save derofim/aa477a180d4bc9810f06 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> | |
| enum Color { RED, GREEN, BLUE }; | |
| Color r = RED, g = GREEN; | |
| int x = 1; | |
| int main() | |
| { | |
| if ( r == g ) { std::cout << "RED == GREEN"; } // false | |
| if ( x == g ) { std::cout << "x=1 == GREEN"; } // true | |
| x = RED; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment