This topic is now archived and is closed to further replies.

2D Array of Objects using new??

This topic is 5579 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have tried to allocate memory using new for a 2D array of an object and no luck? Also if you can do this do you need to use something like this for delete?
//CFOO is a class

CFOO *foo;
foo = new CFOO[10][10];

//now do we use this kind of delete 
delete [] [] cfoo;

Share this post

Link to post
Share on other sites