My code is
int null = 0;
int *p = null;
It gives me an error: cannot initialize a variable of type 'int *' with an lvalue of type 'int'.
In C it would work.
EDIT:
How can I make it work in this spirit?
It's from an exercise (2.32) from the Primer C++ book:
Is the following code legal or not? If not, how might you make it legal?
int null = 0, *p = null;