Suppose I am creating a binary tree data structure using a double linked list. each node of the linked list will have an element and a pointer to two other nodes.
In this instance my question is should I declare the element as a pointer like the pointers to the two other nodes or as a variable?
My more general question is are there any conventions as to when to use a variable and when to use a pointer?
Thanks for your tips.
In this instance my question is should I declare the element as a pointer like the pointers to the two other nodes or as a variable?
My more general question is are there any conventions as to when to use a variable and when to use a pointer?
Thanks for your tips.
Comment