C (265/301)

From:Christian Hattemer
Date:17 Aug 99 at 00:43:18
Subject:Structure Arrays

From: Christian Hattemer <Chris@heaven.riednet.wh.tu-darmstadt.de>

Hi,

I think I've found an easier solution for the problem I had with dynamic
structs. I'm going to pass in the sizeof() of the whole struct and all
offsets with offsetof().

The only problem left is: How do I create an array of structs dynamically?
I'm currently planing to get two blocks of mem, one for the structs and one
for the pointers to them. Then I would fill out the pointer table starting
with the address of the structs area, increased by 4 for each pointer.

Is this a good way to create such an array?

Bye, Chris



__
///
__ /// Amiga 4000T 040/40 Team *AMIGA*
\\\///
\XX/ http://www.riednet.wh.tu-darmstadt.de/~chris/

Fernsehereparaturen "Do It Your Self"
* Aus den Bildr�ndern spritzt zeitweise warmes Wasser:
Sie sitzen vor einer undichten Waschmaschine.