I have the following variables:
char *p; int l=65;
Why do the following casts fail?
(int *)p=&l;
and:
The problem is that when you're performing the casts (aside from whether or not the kind of casting you're doing is a good idea or not) is that the cast expression results in an rvalue.
rvalues cannot be assigned to or have their addreses taken.