Home » Unlabelled » Can a new be used in place of old mallocQ? If yes, why? | C++
Tuesday, 17 April 2012
Can a new be used in place of old mallocQ? If yes, why? | C++
The new operator should be used in place of old malloc because the new operator ensures the calling of an appropriate destructor at the time of execution and also it is more type-safe than mallocQ.
No comments:
Post a Comment