0
Why don't we use astrix in free up of pointer ?i.e. (delete*p)???
someone can tackle this out plss
2 Answers
+ 7
Because at runtime the code context has changed the meaning of the asterisk from "definition" to "dereferencing" -- it already knows the variable type is a pointer.
+ 1
You don't want to delete the value *p, but the whole pointer p.
Really though, just use smart pointers.