weixin_39296576
weixin_39296576
2017-10-23 10:51

C++二维数组的问题,如下;请问如何解决?

2
  • 二维数组
  • c++

int n = 3;
int p[] = {3,2,4,3};
int m[n+1][n+1];
int s[n+1][n+1];
cout<<"What's the division of Matrix A * B * C?"<<endl;
MatrixChain(p, n, m, s);
cout<<"It is "<<Traceback(1,n,s)<<endl;

[Error] cannot convert 'int (*)[(((sizetype)(((ssizetype)(n + 1)) + -1)) + 1)]' to 'int**' for argument '3' to 'void MatrixChain(int*, int, int**, int**)'
[Error] cannot convert 'int (*)[(((sizetype)(((ssizetype)(n + 1)) + -1)) + 1)]' to 'int**' for argument '3' to 'void Traceback(int, int, int**)'

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

5条回答