1 #ifndef SINGLY_LINKED_LIST_CLASS
2 #define SINGLY_LINKED_LIST_CLASS
An object representing the interstitial cell in most linked data structures.
void set_link(int link_number, node *new_link)
Connects the node "new_link" to this node.
node * get_link(int link_number) const
Returns the node that is connected to the specified "link_number".
Implements a singly-linked list structure.
static const int NEXT_NODE
static bool has_cycle(singly_linked_list *check)
returns true if this list has a cycle in it.
int elements() const
returns the number of items currently in the list, including this node.
singly_linked_list * next()
void set_next(singly_linked_list *new_next)
#define NULL_POINTER
The value representing a pointer to nothing.