dynamic array

What is a dynamic array ? how do we resize it and how can we copy all data to the new array, and release the memory for the old array????
What is a dynamic array ?
A container that changes its storage capacity automatically as needed.

how do we resize it
and how can we copy all data to the new array
You answered your own question.

copy
operator= or std::copy:
http://www.cplusplus.com/reference/algorithm/copy/

release the memory for the old array
delete[]

Also:
http://www.cplusplus.com/reference/stl/vector/
Topic archived. No new replies allowed.