Is it possible to create an array that on each execution of the method it
is potentially a different size? For example, let's say I've got a
database of authors. On my form, I want to have a list box to display all
of the authors. To use LstSetListChoices, I have to pass it an array. I
would rather not have a constant define the size of the array because then
I would have to tell the user "There is a limit of x authors." I want it
to be unlimited. Here's what I want to do (conceptually):
static void LoadAuthors(void)
{
...
// query database to see how many authors there are
iNumAuthors = DmRecordsInCategory(dbAuthors, dmAllCategories);
// instantiate the array
Char* AuthorList[iNumAuthors - 1];
...
LstSetListChoices(ListPtr, AuthorList, iNumAuthors);
}
But that doesn't work. Is there a way to accomplish this?
Thanks,
Phillip
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/