在类中定义int **footprint 后 用 M->footprint[pos.x][pos.y]=1 函数为FootPrint(MazeType *M,PosType pos)PostType 中包括int x,int y,MazeType的定义为char **maze;\x09\x09int **footprint;\x09\x09int row;\x09\x09int column;

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/12 09:09:04
在类中定义int **footprint 后 用 M->footprint[pos.x][pos.y]=1 函数为FootPrint(MazeType *M,PosType pos)PostType 中包括int x,int y,MazeType的定义为char **maze;\x09\x09int **footprint;\x09\x09int row;\x09\x09int column;

在类中定义int **footprint 后 用 M->footprint[pos.x][pos.y]=1 函数为FootPrint(MazeType *M,PosType pos)PostType 中包括int x,int y,MazeType的定义为char **maze;\x09\x09int **footprint;\x09\x09int row;\x09\x09int column;
在类中定义int **footprint 后 用 M->footprint[pos.x][pos.y]=1
函数为FootPrint(MazeType *M,PosType pos)
PostType 中包括
int x,int y,
MazeType的定义为
char **maze;
\x09\x09int **footprint;
\x09\x09int row;
\x09\x09int column;

在类中定义int **footprint 后 用 M->footprint[pos.x][pos.y]=1 函数为FootPrint(MazeType *M,PosType pos)PostType 中包括int x,int y,MazeType的定义为char **maze;\x09\x09int **footprint;\x09\x09int row;\x09\x09int column;
footprint是个二维数组对应的二重指针,你可以把它当做二维数组来用,这里M是指向mazeType类型的指针,所以给对应这个类型的结构中的footprint变量的行下标为pos.x,列下标为pos.y的元素赋值为1.