Trying to compile a program, in my accounts.cpp I have 2 errors
accounts.cpp:240: error: name
lookup of `a' changed for new ISO `for' scoping
accounts.cpp:234: error:
using obsolete binding at `a'
here's the code
bool cAccount::IsOnline( int acctnum )
{
if (acctnum < 0) return false;
map<int, acctman_st>::iterator iter_acctman;
if ((iter_acctman = acctman.find(acctnum)) != acctman.end())
{
for (int a = 0; a < now; a++)
{
if (Client[a]->GetAccNum() == acctnum)
break;
}
if (a == now)
{
SetOffline(acctnum);
return false;
}
any help would be awsome thanks :)