Struct SinglyLinkedList::Node

Nested Relationships

This struct is a nested type of Template Class SinglyLinkedList.

Struct Documentation

struct Node

Struct representing a node in a singly linked list.

Public Functions

inline Node(T val)

Constructs a new node with given data and initializes the value of the next pointer.

Pointer to the next node.

Parameters:

val – The value of the data to store in the node.

Public Members

T data
Node *next

The data stored in the node.