Nesting Scope, Example 1
•
{
•
int x = 0;
•
{
•
int y = 0;
•
// x exists, y exists
•
}
•
// x exists, y destroyed
•
}
This code is fine because the variable y exists until the matching brace, which is at the end of the program after the cout << y << endl;