General Dynamics interview question

Suppose we want to create a C++ class which will allow an array to be dynamically allocated according to user input like a vector can be. How could we do this?

Interview Answer

Anonymous

11 Jan 2021

I still see no way of doing this, but he suggested using the new and delete keywords to create a new array of user specified size.