D
desktop
I have read in Bjarne Stroustrup that using malloc and free should be
avoided in C++ because they deal with uninitialized memory and one
should instead use new and delete.
But why is that a problem? I cannot see why using malloc instead of new
does not give the same result.
avoided in C++ because they deal with uninitialized memory and one
should instead use new and delete.
But why is that a problem? I cannot see why using malloc instead of new
does not give the same result.