0 votes
in Other by

How do you allocate and deallocate memory in c++?

1 Answer

0 votes
by

The new operator is used in C++ to allocate memory from the free store (or heap). int *ptr=new int; , and the delete operator to deallocate.

...