Stack implemented with SLL( C++)

Design and code your own LIFO Stack using single liked list to hold a list of integers. Use the C++ “struct” structure to create your SLL nodes. Node position numbering should start with one.

Your program should include the main program to test and demonstrate one function for each Stack operations including:


InitStack – Initialize LIFO Stack

PushStack – Add an item to top of Stack at

PrintStack – Print out the Stack items

PopStack – Remove and return top item from Stack

TopStack – Returns the first item on Stack without deleting it

EmptyStack – Checks for empty Stack condition (TRUE/FALLS)

ClearStack – Delete all items from Stack