I am trying to write a short function which takes a pointer to an array and simply returns it's size. So far what I have is something like this:
int main (void) {
double MyArray[3] = {0, 1, 2};
int Temp = ArraySize(MyArray);
return 0;
}
int ArraySize(double * MyArray) {
return sizeof(MyArray) / sizeof(*MyArray);
}
But this doesnt seem to be working. Any help appreciated, Jack