I understand that dynamic arrays are stored on the heap, and cleared through the delete[] function.
And since vectors are originated and created through the implementation of dynamic arrays, I was wondering if they too are stored on the heap? And if at any time, pieces of a vector are stored on the stack?
(i.e. I need a simple answer that explains how vectors are stored in memory, be that on the stack or heap)
Thanks!