Hello,
I have this code inside a class:
void SendStones()
{
int currenthole = hole;
int lastplace = 0;
for(int i=0;i<stns.size();i++)
{
while(1)
{//Calculate new currenthole
if(currenthole == 13) { currenthole = 7; break;}
if(currenthole == 14) { currenthole = 6; break;}
if((currenthole<=12 && currenthole > 7) || (currenthole<=6 && currenthole > 1)) { currenthole--; break;}
}
lastplace = stns.size()-1;
hole[currenthole]->ReciveStone(stns[lastplace]);//PROBLEM
stns.pop_back();
}
}
vector<Stones*> stns;
so it makes this error: invalid types `int[int]' for array subscript
what's the problem?i don't understand. Thanks.