Your New Friend new and their Partner delete

  • The real strength of a pointer is the ability to deal with dynamic memory.
  • This is memory allocated from the heap.
  • The following are common errors:
  • When you allocate memory
  • new and new[]
  • delete and delete[]
  • Simple memory allocation demo array.cpp.