I need to create a dynamically-sized array of a struct
that I've defined, and I need this array to be
globally available, while it exists. There was a brief
thread on dynamic structures back in December, and the
solution was something like this:
I have this struct :
struct data {
UInt16 referenceID;
Boolean isSelected;
};
"You merely need to cast the pointer returned by
MemPtrNew and assign it to a variable of type struct
data*."
struct data* myPointer;
myPointer = (struct data*)MemPtrNew(sizeof(struct
data));
So would my array be an array of pointers instead? I
was thinking my global variable would be a pointer to
the first record in the array. And when I'm done I
need to free the memory with MemPtrFree, right?
Thanks,
Brian Preston
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/