Project 2
Node.hpp
Go to the documentation of this file.
1
// Adapted from Frank M. Carrano and Timothy M. Henry.
2
4
#ifndef NODE_HPP
5
#define NODE_HPP
6
7
template
<
class
ItemType>
8
class
Node
9
{
10
private
:
11
ItemType item;
// A data item
12
Node<ItemType>
* next;
// Pointer to next node
13
14
public
:
15
Node
();
16
Node
(
const
ItemType& anItem);
17
Node
(
const
ItemType& anItem,
Node<ItemType>
* nextNodePtr);
18
void
setItem(
const
ItemType& anItem);
19
void
setNext(
Node<ItemType>
* nextNodePtr);
20
ItemType getItem()
const
;
21
Node<ItemType>
* getNext()
const
;
22
};
// end Node
23
24
#include "
Node.cpp
"
25
#endif
Node
Definition:
Node.hpp:8
Node.cpp
Generated by
1.8.13