Resizable arrays allow for an unspecified upper-bound of collection elements at runtime, and are conceptuality similar to a list. These dynamic arrays are more complicated and less used in introduction to its compatriot list, which is dynamic by nature. U
There is no way to resize an array. You can simply create a new array of size 2, then copy all the data from the previous one to the new one. realloc does it for you with dynamic memory. The better way is to use data structures such as LinkedLists or Vect
vector : : resize() in C++ STL Last Updated: 26-04-2018 Vectors are known as dynamic arrays which can change its size automatically when an element is inserted or deleted.
Post a Comment:
Showing 0 Comments: