Thursday, March 4, 2010

Scope

The output from the following code is undefined:int i = 1;{int i = i;cout << i << endl;} Reference: C++ Gotchas by Stephen C. Dewhurst. Addison-Wesley, 2002., p. 53.

No comments:

Post a Comment