Home > Back-end >  The knowledge of the node
The knowledge of the node

Time:12-26

I create a somite point node structure, containing the name and the next, and define the h as the head node, r as end nodes, define p for new nodes, so would you like to end node to begin with, behind the head node, and how to insert the new node to the end node after? For detailed explanation and code

CodePudding user response:

You have to sort out a pointer and the relationship between the nodes,
In addition, these concepts come from where, the flank have what you need, as well as the other,

CodePudding user response:

The meaning of the original poster is the tail interpolation to create linked list;


 * create_link XXX () 
{
XXX * tail, * the head;

The head=* (XXX) malloc (sizeof (XXX));
if (! The head)
exit(0);
Tail=head;

While ()
{
* p=(XXX) malloc (sizeof (XXX));
The scanf (XXX);
Tail - & gt; Next=p;
Tail=p;
}
Tail - & gt; Next=NULL;

return head;
}

For your reference ~

CodePudding user response:

To clarify first pointer and linked list
  • Related