In the answers to the question Do I cast the result of malloc? was covered that I do not need and should not cast the returned void
pointer of malloc()
in C.
But how is it about the new
operator in C++?
Is there an explicit reason to only do:
int *p_rt = new int;
instead of
int *p_tr = (int*) new int;
Or can I do the cast?