int array[][2] = {
{1,0},
{2,2},
{3,4},
{4,17}
};
int main()
{
/* calculate array size */
printf(" => number of positions to capture : %d", (int)(sizeof(array)/sizeof(array[0])));
func(array);
return 0;
}
void func(int actu[][2])
{
/* calculate array size */
printf(" => number of positions to capture : %d", (int)(sizeof(actu)/sizeof(actu[0])));
}
结果:
=> number of positions to capture : 4 -- inside main
=> number of positions to capture : 0 -- inside func -- I believe I should get 4 here too
调用和被调用函数中相同数组的大小给出不同的值。请帮我找出问题所在。