Created
July 5, 2014 18:07
-
-
Save boustrophedon/4822d9f36d294d7e3158 to your computer and use it in GitHub Desktop.
the evaluation order of i and ++i is undefined in a single expression. the book said that it's so "compilers have freedom for optimization" but they give warnings anyway so...
This file contains 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> | |
int main() { | |
int i = 0; | |
std::cout << i << " " << ++i << std::endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment