Jump to content
  • Advertisement


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


question about the new operator

This topic is 5311 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
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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!