Jump to content
  • Advertisement

Archived

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

JZ...

VC++ 6.0 new & delete HELP!

This topic is 6736 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

Hello - Im trying to work with 2 dimensional arrays and Im STUCK! I keep gettin assertion failed errors when i try to delete the array? Any Suggestions? PieceClass **piece; int i; piece = new PieceClass *[MAX_WIDTH]; for (i=0;i = new PieceClass [MAX_HEIGHT]; for (i=0;i

Share this post


Link to post
Share on other sites
Advertisement
Looks like some of your code got mangled in the post, but when you delete the rows, are you using delete [] there as well:


for (int i = 0; i < width; ++i)
 delete [] piece[ i ];

delete [] piece;


-Brian

Edited by - osmanb on 3/9/00 9:35:30 PM

Edited by - osmanb on 3/9/00 9:36:02 PM

Share this post


Link to post
Share on other sites

that was it - (even with the warped post)
for some reason i used that code on an array of structs and it worked fine but not that class -
thanks!
JZ...

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!