'i' not in scope

I have the code

void setup()
{

 Serial.begin(9600);

}

void loop()
{
 for (int i = 0; i < 10; i++); // keeps counter local
 {

 Serial.print(i);  // print a numeral

 Serial.print(", ");  // print comma, space

 delay(2000);  //  wait a while
 }
}

I try to compile and get
printTest.png

How can ‘i’ not be in scope?

for (int i = 0; i < 10; i++); // keeps counter local <<<< it sure does!!!
                            ^

whoopsie

i goes out of scope as soon as the 'for' loop ends. As pointed out, you have a ';' right on that line. So, that's where the 'for' loop ends.

vagulus: I have the code

http://forum.arduino.cc/index.php?topic=523121.0

You two taking the same online course?

what a coincidence!

No doubt!