Question: //-------------------------------------------------------------------- using c++ i need the implementation of the stack as single linked list please #ifndef STACKARRAY_H #define STACKARRAY_H #include #include using namespace std; #include
//-------------------------------------------------------------------- using c++ i need the implementation of the stack as single linked list please
#ifndef STACKARRAY_H #define STACKARRAY_H
#include
using namespace std;
#include "Stack.h"
template
public:
StackLinked(int maxNumber = Stack
void push(const DataType& newDataItem) throw (logic_error); DataType pop() throw (logic_error);
void clear();
bool isEmpty() const; bool isFull() const;
void showStructure() const;
private:
class StackNode { public: StackNode(const DataType& nodeData, StackNode* nextPtr);
DataType dataItem; StackNode* next; };
StackNode* top; };
#endif //#ifndef STACKARRAY_H
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
