Template Class StackWithArraySTL
Defined in File stack_with_array_stl.h
Class Documentation
-
template<typename T>
class StackWithArraySTL Stack with STL array class and all related functionality.
- Template Parameters:
T – Type of the the implementation class.
Public Functions
-
inline void push(const T &element)
Push the element at the top of the stack.
- Parameters:
element – The element to be pushed.
-
inline T pop()
Pop the element from the top of the stack and return its value.
- Returns:
The value of the element that has been popped.
-
inline T peek() const
Get the value of the element at the top of the stack.
- Returns:
The value of the element at the top of the stack.
-
inline size_t size() const
Get the current size of the stack.
- Returns:
The current size of the stack.