> I knew "&apple" could get the address of apple variable, about why
we use a
(UINT16 *) command before "&apple" ?
What is this function for?
It's a 'cast 'operator'. If Apple e.g. is of the type 'INT16', but
your function requires a UINT16*, you must cast it to that type. Be
sure you know what you do, since this:
double a=5;
*((int*)&a) = 5;
printf("%d", a);
will result in a funny number. The memory used for 'a' will be cast so
the compiler thinks it really _is_ an int that you are pointing to.
Assinging the first 4 bytes of a double with 0x00000005 will result in
anything else than '5.0'.
-Gernot