Relative Content

Tag Archive for linked-list

C Linked List Implementation Pointer vs. Pointer-to-Pointer Consistency

To get some practice in C, I’m writing some basic functions for operating on a linked list of ints. I started out with functions that accepted as a “list” a pointer to the head node. Now, I find myself running into more and more occasions when I either need to limit the spec of the function more than I would like, or I need to use a pointer to a pointer to the head node to allow for alteration/removal of the head node in a way that is consistent with the way I alter/remove other nodes.

C Linked List Implementation Pointer vs. Pointer-to-Pointer Consistency

To get some practice in C, I’m writing some basic functions for operating on a linked list of ints. I started out with functions that accepted as a “list” a pointer to the head node. Now, I find myself running into more and more occasions when I either need to limit the spec of the function more than I would like, or I need to use a pointer to a pointer to the head node to allow for alteration/removal of the head node in a way that is consistent with the way I alter/remove other nodes.

C Linked List Implementation Pointer vs. Pointer-to-Pointer Consistency

To get some practice in C, I’m writing some basic functions for operating on a linked list of ints. I started out with functions that accepted as a “list” a pointer to the head node. Now, I find myself running into more and more occasions when I either need to limit the spec of the function more than I would like, or I need to use a pointer to a pointer to the head node to allow for alteration/removal of the head node in a way that is consistent with the way I alter/remove other nodes.