Original Post
Hi, I've got a for loop:
for (int i = 0; i < steps; i++)
{
// use i
}
The problem is that if I try to declare variable 'i' after this loop (int i;) I get an error: A local variable named 'i' cannot be declared in this scope because it would give a different meaning to 'i', which is already used in a 'child' scope to denote something else. If I try to use variable 'i' after this loop (i.e. i++;) compiler says that: The name 'i' does not exist in the current context. So there's no variable 'i' after the loop anymore, yet I can't create it? Why is that?