This is just a basic question. I've created a struct that needs to create mutliple instances, but of a constantly changing number.
Grab number of objects from memory.
Code:
struct _NumOfObjects
{
unsigned short Max;
unsigned short Num;
};
_NumOfObjects * NumOfObjects = ( _NumOfObjects * ) OTNumAddy;
Code:
struct _Lengths
{
float AX;
float TrueBX;
float ExtremeBX;
float AY;
float TrueBY;
float ExtremeBY;
float dist;
float mx, my, mz;
} Length[NumOfObjects->Num];
I need to create an instance for each seperate object, but I get this error:
error C2057: expected constant expression
error C2466: cannot allocate an array of constant size 0
Is there a way to do this without a constant? The num of objects changes quite frequently.