嘿伙计们,我的大脑已经正式进入所有这些项目,因为我似乎可以找出这个相对简单的错误.
所以我遇到的问题是它要求我在curli括号之前添加一个分号,这里是它发生的代码段.
bool IsAlive(int row, int col){
return true;
}
Run Code Online (Sandbox Code Playgroud)
它是在'col)之后问我一个分号.这是完整的代码
#include <iostream>
#include <windows.h>
#define NumGen 1
#define NumRows 13
#define NumCol 13
using namespace std;
void main()
{
const int NumModRows=NumRows+2;
const int NumModCol=NumCol+2;
int grid[NumGen][NumModRows][NumModCol]={0};
grid[NumGen][0][0]=5;
//cout<<"Hey this is number "<<grid[NumGen][0][0]<<endl;
//int upLeft=-1, upMid=-1, upRight=-1, left=-1, right=-1, botLeft=-1, botMid=-1, botRight=-1;
//cout<<"All: "<<upLeft<<", "<<upMid<<", "<<upRight<<", "<<left<<", "<<right<<", "<<botLeft<<", "<<botMid<<", "<<botRight<<endl<<endl;
//get input from user
int rowInput;
int colInput;
int numInputs;
cout<<"how many inputs will be inserted in the …Run Code Online (Sandbox Code Playgroud)