私の場合、必要なコードは次のようになります。
anRow0[] = {0,0,0,0,0,0,0}
anRow1[] = {0,0,0,0,0,0,0}
anRow2[] = {0,0,0,0,0,0,0}
int place(int nVar1, int nVar2) //Where nVar1 is the row and nVar2 = current turn
{
int nVert = 0;
while (anRow\i want to add nVar1 here\[nVert+1] && nVert < 6)
{
nVert += 1;
}
anRow[nVert] = nVar2;
return true;
}
if (nVar1 == 0) //check
anRow1[] などにいくつかの " を作成できますが、それは非効率的です。
このような数値を追加する方法はありますか? また、残りのコードは無視してください。たとえば、while を for に置き換えることができることはわかっていますが、それは論外です。
どんな助けにも感謝します