c - Remove last node of linked list by passing it in to a void? -


This removes the head of the code linked list when the list is used as a parameter to zero.

Zero Exit Node (node ​​** major) {(* head) = null; } Is

To set up the last item of the list I used as an argument to the code to change the will that NULL to?

Note: I would like the list to be used in this method the main void and I as a "head" parameter to be used as the last node to node.

  void left removed (node ​​** head) {if (! Head ||! (* Head) ||! (* Head-> Next)) return; Node * tmp = * head; Node * new_last; // (; tmp- & gt; next;); access the last node; {New_last = tmp; Tmp = tmp- & gt; next; } Free node (TMP); Tmp = NULL; New_last- & gt; Next = null; }  

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -