在类中定义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/06/28 15:04:56
![在类中定义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;](/uploads/image/z/5099573-29-3.jpg?t=%E5%9C%A8%E7%B1%BB%E4%B8%AD%E5%AE%9A%E4%B9%89int+%2A%2Afootprint+%E5%90%8E+%E7%94%A8+M-%3Efootprint%5Bpos.x%5D%5Bpos.y%5D%3D1+%E5%87%BD%E6%95%B0%E4%B8%BAFootPrint%28MazeType+%2AM%2CPosType+pos%29PostType+%E4%B8%AD%E5%8C%85%E6%8B%ACint+x%2Cint+y%2CMazeType%E7%9A%84%E5%AE%9A%E4%B9%89%E4%B8%BAchar+%2A%2Amaze%3B%5Cx09%5Cx09int+%2A%2Afootprint%3B%5Cx09%5Cx09int+row%3B%5Cx09%5Cx09int+column%3B)
在类中定义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.