
POSTED: Dec 21, 2009 3:41 PM (GMT)
Does this code compile ?
Since *Object is a pointer, I think you should use this notation:
Frame[t].Object->objectTransformX = 0;
instead of:
Frame[t].Object.objectTransformX = 0;
As for the memory exception, you are allocating memory for objectCount Objects and frameCount Frames, but we don’t know what’s the value of ‘t’ (in fact, we don’t even see where you declare it) at the time you get the error.
Also, what is this code doing inside a for loop where you only increment ‘i’ (and ‘t’ remains unchanged) ?:
Frame[t].Active = false; Frame[t].Object.objectTransformX = 0;
On the other hand, why are you using C’s malloc function instead of C++’s new operator ?
















