I have the following variables:
char *p; int l=65;
Why do the following casts fail?
(int *)p=&l;
and:
In plain C, which is not that strict to type conversions, this code would compile and actually work. On a C++ compiler it would actually require explicit casts as already mentioned (see other answers).