Hi all,
i passed an array of integer
into a function like this:Code:int myarr[10];
however when i tried to find out the length of myarr in the function using:Code:int *function(int *array, size){ ... }
it returns only (i think) the size of the memory location *array pointed to, which is the start of myarr?Code:int arrSize = sizeof(array)/sizeof(int);
How should i find out the length of myarr in the function without passing in one more argument?
Thanks in advance!



LinkBack URL
About LinkBacks



