View Single Post
Old 04-20-2006, 05:46 AM   #10 (permalink)
Chris
 
Chris's Avatar
 
Join Date: May 2003
Location: Temple Prime, Sarajevo
Age: 22
Posts: 16,154
Well, the array of units is probably a pointer to unit objects. So it will only take up the memory of what its pointing too. Like in C++, a class can have something like

char * y;

This is a char pointer that is currently Null. You can use Dynamic Memory Allocation to populate it with whatever you wanted. Like to put the word LOL in it, you would need to allocate 4 elements (1 byte/element up to 3, including the terminating byte).

Units might be classes in that case, so there would be a pointer of unit classes inside the program when you do this. So, I guess it would be fine, I will try it out and see if there is any changes.

Man this talk about arrays has really gone technical.
__________________



One Vision. One Purpose.
Through leadership in Kane, we seek a new Tiberium future.
Our stealth and advanced weaponry will bring swift death to any who oppose us.
PEACE THRU POWER!


Ookamizu-sama - Nezmod 2HS Zealbarb - Level 20 of 750

My Personal Blog Page - Updated every Friday
Join the Phantasy Star Online sensation - ChrisH36
Chris is offline   Reply With Quote