Mail Archives: djgpp/1997/01/24/13:32:18
In article <32E453A2 DOT FA3 AT cs DOT com>, "John M. Aldrich" <fighteer AT cs DOT com>
writes
>Josh Anderson wrote:
>>
>> I know this is a stupid question, but how do you create a dynamic array of
>> a bunch of structs? I only need to set the size of the array at init time.
>> And then free the memory at exit.
>If you want to make the entire list dynamic, i.e.; its size can change
>during runtime, then you need a much more complex algorithm, but again
>it's something that's in every C textbook I've ever seen. If you really
>still need help, email me in private and I'll send you more samples.
Surely simply using a realloc will suffice?
--
Moo-Juice
- Raw text -