假設我有以下c
功能:C - 數組中的元素數量?
int MyFunction(const float arr[])
{
// define a variable to hold the number of items in 'arr'
int numItems = ...;
// do something here, then return...
return 1
}
我怎樣才能進入numItems
在陣列arr
中的項目數量?
我記得我用來做大小另有說法爲這樣那樣的功能.. [靜態數組元素的數量的 – mihsathe
可能重複和動態數組](http://stackoverflow.com/questions/2577711/number-of-elements-in-static-array-and-dynamic-array) – sth