How can I realloc
in C++? It seems to be missing from the language - there is new
and delete
but not resize
!
I need it because as my program reads more data, I need to reallocate the buffer to hold it. I don't think delete
ing the old pointer and new
ing a new, bigger one, is the right option.