In C++, the realloc() function is used to resize dynamically allocated memory. It is defined in the header and works with malloc() and calloc(). However, C++ developers prefer new and delete over realloc() because realloc() does not call constructors or destructors. https://docs.vultr.com/cpp/standard-library/cstdlib/realloc