编译出错??请帮看看是哪里出错?
#include "stdafx.h"void row_to_col(int a[3][3],int b[3][3]);
int main(int argc, char* argv[])
{
int c[3][3]={{1,2,3},{4,5,6},{7,8,9}};
int d[3][3];
row_to_col(c[3][3],d[3][3]);
return 0;
}
void row_to_col(int a[3][3],int b[3][3])
{
int i,j;
for(i = 0;i < 3;i++)
for(j = 0;j < 3;j++)
b[i][j] = a[j][i];
}
出错提示:
F:\MyProjects\tuy\tuy.cpp(14) : error C2664: 'row_to_col' : cannot convert parameter 1 from 'int' to 'int [][3]'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast