Look up dynamically resizing array if that's what you're trying to do, which is the only reason I could see for wanting an index size value that changes. Standard C would balk at changing an array size like this as well, it's bad form since you could increase your array size and go out of bounds into whatever was allocated in memory after it. I know Lite-C handles resizing strings automatically if you use the Lite-C string functions, but try doing it from a DLL and it'll crash periodically because of the out-of-bounds issue.
Something like you're seeming to do generally requires reallocating a memory chunk of the appropriate size to hold your array of structs, copying the data into the new array elements then freeing the old array. You may be asking Lite-C to perform a task it's not designed to handle automatically.
This problem would best be handled by using a linked-list methodology. Look up linked-lists on the net and get a firm understanding of how they can cope with unlimited (well, memory constrained) numbers of arrayed structs just like this problem. Since you can do pointers in Lite-C I'd point you in that direction.
Unless someone else knows otherwise.
QM
Last edited by quantum69; 07/29/08 07:11.