No, I meant if I used new to put the dynamically created array of pointers on the heap and then looped through it to create sub-arrays for the second dimension, I would need to loop through the sub-arrays and delete them before deleting the main array or else I would lose all my pointers but still have allocated space.
Thanks for everyone's input! Dave -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bryan Murdock Sent: Tuesday, May 22, 2007 3:33 PM To: BYU Unix Users Group Subject: Re: [uug] Dynamically allocated arrays On 5/22/07, David B Darrough <[EMAIL PROTECTED]> wrote: > Yeah, I was afraid of that...it looks like that is the answer. Of course I > then have to remember to deallocate space for the sub-arrays before > deallocating the main array. But I think you're right. So have you thought about going with vectors now? Bryan -------------------- BYU Unix Users Group http://uug.byu.edu/ The opinions expressed in this message are the responsibility of their author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG. ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list -------------------- BYU Unix Users Group http://uug.byu.edu/ The opinions expressed in this message are the responsibility of their author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG. ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
