New course! Every coder should learn Generative AI!
Try a free lesson0
the heap is used for allocating memory dynamically at runtime, to do this in C++ we need the keyword new and afterwards (after the object/value is not needed anymore) we should use delete to free up the space again
from the name you can imagine the heap like something that is piling up chaotically