C++中,二维数组作形式参数时,格式怎么写,最好来一个简单的例子

来源:百度知道 编辑:UC知道 时间:2024/05/26 16:34:29

int max(int a[][4])//参数也可写为int (*a)[4],第二维一定要指定
{
return 0;
}
void main()
{
int a[4][4]={0},b;
b=max(a);//调用
}

main()
{
int score[10][5];

void calc_score(int score[10][5]);
......
calc_score(score);

}

void calc_score(int score[10][5])
{

}