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;

Recommended Answers

All 2 Replies

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]

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.