...

/

Allocation of Dynamic Memory

Allocation of Dynamic Memory

Learn how memory can be dynamically allocated to variables in C++.

Introduction

For dynamic allocation, we have to do the following two steps:

  • First, allocate the dynamic space.
  • Then, store the starting address of the dynamic space in the pointer.

new operator:


...