Prashant | Sun, 02 Aug, 2020 | 107
In this post, we are going to learn about the delete and free() in C++, what are the differences between delete and free()?
Quick introduction about delete and free()
Basically, it was used in C programming language, to free the run time allocated memory, it is a library function and it can also be used in C++ for the same purpose. free() is declared in stdlib.h header file.
delete is an operator in C++ programming language, it is used to free the run time allocated memory.
Both are used for same purpose, but still they have some differences, the differences are: