what is difference between delete and free?
Delete is an operator while Free is a function. Delete frees the allocated memory and also calls the destructor of the class in c++ while free() does not calls any destructor and only free the allocated memory . Free() uses C run time heap whereas Delete may be overloaded on class basis to use private heap.