Binary Search Tree (C++)
Loading...
Searching...
No Matches
StackNode Struct Reference

Internal node type used by the Stack class. More...

#include <Stack.h>

Public Member Functions

 StackNode (Node *data)
 Constructs a StackNode with the specified node pointer.

Public Attributes

Nodedata
StackNodenext

Detailed Description

Internal node type used by the Stack class.

StackNode stores a pointer to a tree Node and a link to the next stack node. This struct is used only to implement the stack's internal linked list and does not assume ownership of the Node* it stores.

Definition at line 54 of file Stack.h.

Constructor & Destructor Documentation

◆ StackNode()

StackNode::StackNode ( Node * data)
inline

Constructs a StackNode with the specified node pointer.

Parameters
dataPointer to the Node stored in this stack element.

Definition at line 62 of file Stack.h.

62: data(data), next(nullptr) {}

Member Data Documentation

◆ data

Node* StackNode::data

Definition at line 55 of file Stack.h.

◆ next

StackNode* StackNode::next

Definition at line 56 of file Stack.h.


The documentation for this struct was generated from the following file: