--- Lance wrote:
> I am a newbie at PalmOS and C so please bear with me...

OK

> I would like to have similar functionality in my Palm version and
> thought of using a declaration such as...
> 
> typedef struct
> {
> Char* Title;
> Char* Text;
> TreeNode TreeNodes[10];
> }TreeNode;
> 

You can't do that in C.  However, you can do something like this:

typedef struct
{
  Char* Title;
  Char* Text;
  struct TreeNode *TreeNodes;
} TreeNode;

TreeNode *treeNodeP;

(See pg 131 of the version 1 of "The C Programming language to for
explanation.)

WARNING: Stack space on all current Palm OS devices is extremely small,
so recursion is almost always a bad idea.  Especially if you were
serious when you said "Theoretically, the tree would support an
infinite number of 'generations' of children nodes."


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - sign up for Fantasy Baseball
http://sports.yahoo.com

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to