next 'problem':
i've got a struct including an array
this array should be variable in its length , but <= MAX_LENGTH
infact this struct is now filled with 256 unused integersPHP Code:
#define MAX_LENGTH 256
struct myStruct
{
int array[MAX_LENGTH];
};
how do i get anything similar to this without having a big empty array?
EDIT:
and i dont want to allocate new memory for every single input
so neither 'int* array;' nor 'int array[];' will work without that and without using static construction like: 'struct myStruct s = { 1 , 2 , 3 };'