Jump to content
  • Advertisement

Archived

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

question about the new operator

This topic is 5106 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 two classes CSprite and CAction. CSprite creates an array of CAction using the new operator. In CAction i use the new operator to create an array of type RECT. The array of RECTs is not returning the pointer to the first element. It is returning 0.
	
frames = new RECT[total_frames];	
 
i recieve the following errors: First-chance exception in quad_Batching.exe (NTDLL.DLL): 0xC0000005: Access Violation. First-chance exception in quad_Batching.exe: 0xC0000005: Access Violation.

Share this post


Link to post
Share on other sites
Advertisement
That means that there was not enough memory to allocate the array.

Make sure total_frames has the value you expect.


Thanks Salsa!Colin Jeanne | Invader''s Realm
"I forgot I had the Scroll Lock key until a few weeks ago when some asshole program used it. It even used it right" - Conner McCloud

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!