Brief Overview on Linked List
This documentation is written in a way to introduce the idea of a linked list
 
Loading...
Searching...
No Matches
node.hpp
Go to the documentation of this file.
1
5#ifndef NODE_HPP
6#define NODE_HPP
10class Node {
11 public:
16 Node( int const new_val );
21 Node( int const new_val, Node*const p_new_head );
37 int getValue() const;
56 Node* get_nextNode() const;
76 void value( int const new_val );
104 void p_next( Node*const p_new_head );
105
106 private:
109 int val_;
111 Node* p_next_;
112};
113#endif
Node Properties and Methods for the Linked List.
Definition node.hpp:10
Node * get_nextNode() const
Method that will return the address of the next node that the current node is pointing to.
Definition node.cpp:22
Node(int const new_val)
Constructor Creates a new node with an assigned value.
Definition node.cpp:8
void p_next(Node *const p_new_head)
Method that will modify the address of the next node in the current node.
Definition node.cpp:31
void value(int const new_val)
Method that will modify the value of the current node with the requested value.
Definition node.cpp:26
int getValue() const
Method that will return the current value being stored in the node.
Definition node.cpp:18