C++ 函数之间 二维数组传值实例

1.CPP

int Results[20][4];

int RBlobCount;

others(&RBlobCount, Results);  //这里数组不用写[20][4]

int b = Results[1][1]               //这里就能获取了 b=1

2.h

void others(int* RBlobCount, int Results[20][4]);

2.cpp

void others(int* RBlobCount, int Results[20][4]){

Results[1][1] = 1; //这里赋完值就可以了

}

猜你喜欢

转载自blog.csdn.net/sxmsxmsmxm/article/details/127131414