- #1
Peter P.
- 23
- 0
I decided to make the switch from C to C++ and I'm having trouble with vectors. In C, I prefer to use dynamically allocated arrays when doing multidimensional arrays. But in C++, I know that there is the new function which replaced malloc. I read that when dealing with multidimensional arrays in C++, ideally a vector would be used.
So my question is, can someone just provide a quick run through of creating a 2D vector, changing the size of the vector, and then deleting it? Thank you in advance, any help is much appreciated.
So my question is, can someone just provide a quick run through of creating a 2D vector, changing the size of the vector, and then deleting it? Thank you in advance, any help is much appreciated.