我在这里有一个问题,即循环正在递增currentList,我无法解决问题所在。我不知道如果我遗失了什么或者我应该清理并重建?
int currentList = 0;
bool gatesBool[2][7];
bool currentGateList[];
EV << "CurrentList 1 is " << currentList << endl;
for (int x=0; x!=7; x++)
{
EV << "CurrentList 2 is " << currentList << endl;
if ( gatesBool[currentList][x] == true)
{
currentGateList[x] = true;
EV << "CurrentList 3 is " << currentList << endl;
}
else
{
currentGateList[x] = false;
EV << "CurrentList 3 is " << currentList << endl;
}
};
CurrentList 1为0
CurrentList 2是0
CurrentList 3是1 CurrentList 2是1 CurrentList 3是1 CurrentList 2是1 CurrentList 3是1 CurrentList 2是1 CurrentList 3是1 CurrentList 2是1 CurrentList 3是1 CurrentList 2是1 CurrentList 3是1 CurrentList 2是1 CurrentList 3是1