Data Structures Class Templates
Various data structures implemented using c++ class templates.
|
Go to the documentation of this file.
14 arr =
new T[s_size+1];
52 cout <<
"Stack is empty.\n";
56 cout << arr[i] <<
"\n";
~Stack()
Destructor.
Definition: stack_impl.h:19
Exception class for Stack overflow runtime error.
Definition: stackoverflowerror.h:12
Exception class for Stack underflow runtime error.
Definition: stackunderflowerror.h:12
Contains implementation of StackError base exception class.
void push(T value)
Member function to push data into the stack.
Definition: stack_impl.h:27
void display()
Member function for displaying the stack.
Definition: stack_impl.h:48
Stack(size_t s=10)
Constructor.
Definition: stack_impl.h:13
T stacktop()
Member function which returns element at top of the stack.
Definition: stack_impl.h:41
T pop()
Member function which removes and returns element at the top of the stack.
Definition: stack_impl.h:34