Created
December 29, 2014 22:21
-
-
Save leifwalsh/7037a68607775807ca6a 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
int main(void) { | |
int x = 1; | |
int *y = &x; | |
return true ? x : y; | |
} |
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
% g++ ternope.cpp | |
ternope.cpp: In function ‘int main()’: | |
ternope.cpp:4:17: error: operands to ?: have different types ‘int’ and ‘int*’ | |
return true ? x : y; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment