I have just learnt C so I always meet some problem
Could you tell me the meaning of this code?

void  InsertListOrder(Nodeptr &Head,Nodeptr G)
{
    Nodeptr  P, Q;
    P = Head;
    while (P != NULL)
    {
    if (strcmp(P->key.tu,G->key.tu)>0) break;
    Q = P;
    P = Q->next;
    }
    if (P == Head)
    {
    G->next = Head;
    Head = G;
    }
    else
    {
    G->next = Q->next;
    Q->next = G;
    }
}

I don't understand "nodeptr &Head"
thank you :)

That is a reference to a nodeptr object in another function. The object is passed by reference so that InsertListOrder() can change its value. Any changes to Head in funciton InsertListOrder will be made to the object in the function that calls InsertListOrder().

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.