int main (int argc, char* argv[])
{
array_test(arry);
array_test(empty_arry);
return 0;
}
compile error:
[zengchao@cmcc-server2 ]$g++ test.cpp
test.cpp: In function ‘int main(int, char**)’:
test.cpp:16: error: no matching function for call to ‘array_parameter(int [0])’
Well, it is logical as zero-length arrays are illegal in C++
Standard wrote:
8.3.4 Arrays [dcl.array]
1. [...] If the constant-expression (5.19) is present, it shall be an integral constant expression and its value shall be greater than zero. [...] An object of array type contains a contiguously allocated non-empty set of N subobjects of type T.