I dont really want to mix c and c++ memory allocation functions. i suppose i could just use the c ones, but try getting that past the coding standard police here!
Main Topics
Browse All TopicsHow can i resize memory that i have new'd? Particularly a char*
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
>>I did think of that. Hoped for an easier away (i.e less typing!)
Well that's certainly an option. C++ coupled with a template can make a "renew" operator in short order. Add that ot your "bag of tricks" and you'll be all set. I suppose a case could be made for having that included in the standard set of C++ operators but for whatever reason it was not. Most likely because it's sort of redundant since it can be done quickly and easily without having it built-in.
Business Accounts
Answer for Membership
by: n8shadowPosted on 2003-10-09 at 02:34:59ID: 9519357
realloc is the func u need. but be carefull mixing malloc/realloc with new operators isn't something u should do because it's not very save in order u do not now how the new operator is implemented. maybe it would be better if u create your own realloc function or use for memory allocation the malloc function!
library/de fault.asp? url=/libra ry/ en-us/v ccore98/ht ml/_crt_re alloc.asp
http://msdn.microsoft.com/