C++ 算法 参数传递错误?

void mazePath(int *maze[],int *directon[],int x1,int y1,int x2,int y2){
int i,j,k,g,h;
PSeqStack pastack;
pastack = createEmptyStack_seq(8*11);
DataType s;
maze[1][1]=2;

}
int main(){
int maze[][11]={1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,1,1,
1,0,0,1,1,0,0,0,0,0,1,0,0,1,1,1,0,1,1,1,0,0,0,1,1,1,1
,0,0,0,1,0,1,1,0,1,1,1,1,0,0,1,0,1,1,0,0,1,1,1,1,0,0,
0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1};
int direction[][2]={0,1,1,0,0,-1,-1,0};
mazePath(maze,direction,1,1,6,9);
return 0;}
p|78|error: cannot convert 'int (*)[11]' to 'int**' for argument '1' to 'void mazePath(int**, int**, int, int, int, int)'|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

噜噜哒
浏览 894回答 1
1回答

千万里不及你

参数形式错,你那是指针数组;应该是:void mazePath(int (*maze)[],int (*directon)[],int x1,int y1,int x2,int y2)
打开App,查看更多内容
随时随地看视频慕课网APP