--- In [email protected], "raj_duttaphookan"
<[EMAIL PROTECTED]> wrote:
>
> Why can't we simply
> define it as a pointer. It shall anyway hold the memory address and
> later on while dereferencing it, it shall automatically dereference it
> depending on whether the memory address it contained was that of an
> int or a float or a char etc.
But when dereferencing, how would the compiler know what was stored in
the memory? It can't just use the destination type. For example:
pointer p;
int i;
i = *p;
Does the memory pointed to by p contain a 4 byte integer, a 2 byte
integer, or a 1 byte character, all of which can be assigned to an
integer variable?
John