C++ Mid-Block Declarations Bob Walton, 7/16/96 C++ permits you to write: { int x; x = 8; int y; y = 9; } and treats it as if you had written: { int x; x = 8; { int y; y = 9; } } In other words, C++ is nice enough to put in the braces for you. However there is one difference between putting-in-the- braces and C++. C++ will not permit you to declare the SAME variable twice in one block. Thus { int x; x = 8; int x; x = 9; } is illegal C++ but { int x; x = 8; { int x; x = 9; } } is legal C or C++.