C
CplusplusNewbie
I wonder why the authors of C++ didn't write the delete function so
that, for example, the code delete p; stands for
delete p; p = 0;
That way, there would be no problem if pointers were deleted twice.
Is there ever a situation where it would be problematic to set a
pointer to 0 after deletion?
Thank you.
that, for example, the code delete p; stands for
delete p; p = 0;
That way, there would be no problem if pointers were deleted twice.
Is there ever a situation where it would be problematic to set a
pointer to 0 after deletion?
Thank you.