#include <iostream>using namespace std;void test( int x[] );int main(){ int a[]={3,3,3}; test(a); return 0;}void test( int x[] ){ int len = sizeof(x)/sizeof(int); cout<<len<<endl;}
为什么上面这段代码输出结果总是1啊?
传数组后怎么在函数内计算数组长度啊?
难道就没有办法在 test( int x ) 函数里面求传送进来的数组的长度吗??