Why does the following not give an error?

```
for (int i=0; i<10; ++i) // outer loop
{
    for (int i=0; i<10;++i) // inner loop
    {
    //...do something
    }
//...do something else
}

```

The way I understand it, variables in braces ({...}) are in scope only within these braces. But the inner loop is inside the braces of the outer loop. So as soon as I declare `int i=0` for the inner loop, shouldn't I get an error about multiple definitions?