Subj : Re: realloc() issue on C++ To : borland.public.cpp.borlandcpp From : Sebastian Ledesma Date : Mon Mar 21 2005 12:45 pm Hola José: I used to do: #include TArrayAsVector <*TMyObject> myVec(initialSize, 0 , delta); for (i=0; i escribió en el mensaje news:423ddfc7@newsgroups.borland.com... > Yes, std::vector is the clean solution for a new code. > > However, my problem is practical. I have 15000 lines of ANSI C code, > converted to C++ and making use of templates to apply the algorithm in > custom data types. The original malloc() and free() calls were converted > to new [] and delete [], to guarantee constructors and destructors calls > for each array element. For the realloc() calls, i need a way to expand > the memory, now obtained through the new [] operator. > > Someone know a "quick & dirty" way to solve this problem? > > .