已经整理好多次了 没用又忘记了 但是又找不到以前写的了,这次总结了就写出来 总感觉还有没写完,,,欢迎留言帮助,谢谢!!
#include <iostream>
using namespace std;
void fun1(int a[][10], int rowL, int colL)
{
for(int i = 0; i < rowL; i ++)
{
for(int j = 0; j < colL; j ++)
{
cout << a[i][j] << " ";
}
cout << endl;
}
}
void fun2(int (*a)[10], int rowL, int colL)
{
for(int i = 0; i < rowL; i ++)
{
for(int j = 0; j < colL; j ++)
{
cout << a[i][j] << " ";
}
cout << endl;
}
}
int main()
{
int arry[][10] = {{0,1,2,3,4,5},{6,7,8,9,10,11},{12,13,14,15,16,17}};
fun1(arry,3,6);
fun2(arry,3,6);
system("pause");
return 0;
}