View Single Post
Old 06-20-2004, 11:23 AM   #1 (permalink)
Mr.Anderson
Registered User
 
Mr.Anderson's Avatar
 
Join Date: Mar 2003
Location: In a van, down by the river.
Posts: 24
Mr.Anderson is on a distinguished road
Send a message via AIM to Mr.Anderson Send a message via Yahoo to Mr.Anderson
Wink Dynamic Arrays, the 'right' way.

I'm confused, as is not so uncommon a circumstance.
I've been working on building a dynamically resizable data structure
in C++. I've heard a number of people talk about malloc as a method to resize existing arrays, but I've never been able to get it to work. I did complete one application that used (ARRAY) = new (type) with a pretty good deal of success, but I'm wondering if there's a better way.
In a sense, I'm asking about malloc vs. new and why someone would use malloc when 'new' is available.

Comments? Criticism?

If need be, I can post some code from the other application I have.

[Ed.] D'oh, and only moments after posting.
Nevermind, I found a link in another tut.
http://www.cplusplus.com/doc/tutorial/tut3-4.html
^_^;
Mr.Anderson is offline   Reply With Quote