Algorithms_in_C++ 1.0.0
Set of algorithms implemented in C++.
Loading...
Searching...
No Matches
Node< ValueType > Class Template Reference

#include <node.hpp>

Collaboration diagram for Node< ValueType >:
[legend]

Public Types

using value_type = ValueType
 

Public Member Functions

 Node (int v, Node *n)
 

Public Attributes

int data
 
int next
 
ValueType data = {}
 
std::shared_ptr< Node< ValueType > > next = {}
 
int val
 
Nodenext
 

Detailed Description

template<class ValueType>
class Node< ValueType >

for std::cout for std::shared_ptr for std::vector Definition of the node as a linked-list

Template Parameters
ValueTypetype of data nodes of the linked list should contain

Constructor & Destructor Documentation

◆ Node()

template<class ValueType >
Node< ValueType >::Node ( int v,
Node< ValueType > * n )
inline
8: val(v), next(n) {} // Default constructor for Node

Member Data Documentation

◆ data

template<class ValueType >
ValueType Node< ValueType >::data = {}
18{};

◆ next

template<class ValueType >
std::shared_ptr<Node<ValueType> > Node< ValueType >::next = {}
19{};

The documentation for this class was generated from the following files: