int *space=new int[c-1];
int top(int space[]){}
作为函数参数传递时,如topMax(space);在topMax函数中使用space[i]可以取得space数组的所有元素值,但是不能在topMax函数中通过sizeof(space)\sizeof(space[0])来获得space数组的长度。
只能把space数组的长度作为topMax()函数的参数传递进去。