In Destroy()
, a reference to the pointer is passed, then after the first call of this function, the pointer a
will become zero. During the second call of Destroy()
, a null pointer will be passed to delete
. By standard, the delete operator must correctly process the null pointer, so the program will exit successfully.
Also, according to the standard, the main function may not accept arguments and may not contain a return statement.
Login in to like
Login in to comment