Quote:
> Does anyone know whether there is function in c++ as the
> function realloc in c? How can I re-allocate memory when I
> find the memory allocated by new is not enough?
You can't. You have to allocate and copy.
It's been suggested that some kind of realloc should be added to
allocators in the next round of the standard so that the standard
containers can extend their current allocation on expansion (if
possible) instead of doing an allocate and copy.
--
Craig Powers
MVP - Visual C++