There is something I don't really understand about calculating number of elements in Array.
int array[] = { 10, 20, 30, 40 };
int * ptr = array;
int size1 = sizeof ( array ) / sizeof( int);
int size2 = sizeof ( ptr ) / sizeof( int );
Only size1 gives correct number of elements, not size2.
How come size2 calculation does not work?
Any thing I can do to make it work?