If I have to do the basic tree with these declarations

    typedef struct item
    {
        char petname[20];
        char petkind[20];
    } Item;

    typedef struct node
    {
        Item item;
        struct node * left;    /* pointer to right branch  */
        struct node * right;   /* pointer to left branch   */
    } Node;

    typedef struct tree
    {
        Node * root;           /* pointer to root of tree  */
        int size;              /* number of items in tree  */
    } Tree;

what changes do I need to solve this

*Modify the Pet Club program so that all pets with the same name are stored in a list in the same node. When the user chooses to find a pet, the program should request the pet name and then list all pets (along with their kinds) having that name.
*

how would you insert a node in the tree given a pet name?
Is choosing if to move to the left and right child alphabetical by the name of the pet?

as my opinion on knowing the root you could simply make a pointer for the first node of the tree, and use that pointer as the root to traverse the whole tree
also the petname and petkind variables can go in the node structure to make assigning more easier
To summarize you could simply use one structure for the whole program to make it simpler

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.