Firstly, i know that in normal "int main(void)" stuff, to find the # of elements in an array, say int p[], you do:
num_elem=sizeof(p)/sizeof(int)
(**i think sizeof(p)/sizeof(p[0]) is more general**)

However, i was passing an array to a function:

int my_func(int q[])
{
cout<<sizeof(q)<<endl; //Gives 4 (=sizeof(int)) every time
}

I was just wondering if there was a nice way to find the size of an array passed to a function??

Thanks