question about the new operator

Started by
0 comments, last by fencer 19 years, 10 months ago
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.
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

This topic is closed to new replies.

Advertisement