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.(adsbygoogle = window.adsbygoogle || []).push({});

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.

**Physics Forums - The Fusion of Science and Community**

# C++ Vectors

Know someone interested in this topic? Share a link to this question via email,
Google+,
Twitter, or
Facebook

- Similar discussions for: C++ Vectors

Loading...

**Physics Forums - The Fusion of Science and Community**