Possible Duplicate:
How do yourealloc
in C++?
I know that C++ arrays can be reallocated (expanded) using realloc()
if memory has been allocated via malloc()
or calloc()
. My question is, how can I expand an array in C++ whose memory has been allocated via the new
operator?