how we are reallocation memory in c++, is there any functions or automatically reallocated
Memory reallocation in c++
Collapse
X
-
Tags: None
-
Well obviously if you used malloc you can use realloc.
If you didn't use malloc but chose an OO approach then you probably wont need to realloc any memory. If you need to reallocate that suggests you are using an array. Arrays are not the thing to use in C++ you should be using one of the STL container classes which handle the allocating and reallocating of data for you.
Comment