hi gud pm!!!!

i have a problem the compiler says that in this code..."name lookup change ISO 'for' scoping then using obsolete binding at i"...

please help badly!!!!

  for (int i=0; i<20; i++){
                         r [i]=0;
                           }


           switch (ch){


                  case 'a':


                                    cout<<"Please enter your password first\n";

                                    if (ch=='a' && r[i]!=0){

                                    clue();
                                    }

                                    break;

Edited 3 Years Ago by mike_2000_17: Fixed formatting

compiler says that in this code..."name lookup change ISO 'for' scoping then using obsolete binding at i"...

It means that the i exists only within the for() loop.

You might change it to ...

int i;
for (i=0; i<20; i++)
{
    r [i]=0;
}
// ...

[EDIT]
And please use code tags when posting code.

[code=cplusplus] your code here ...

[/code]

This article has been dead for over six months. Start a new discussion instead.