I tried doing this in Visual Studio. There are two cases:
1)
delete p;
delete p;
This compiles properly but gives debug assertion failure when you run the program because you are trying to delete the memory location which is already deleted and no longer belongs to you.
2)
delete p;
p = NULL;
delete p;
This compiles properly and runs properly. There is no error. Try printing p
before and after delete.