CITS2002 Systems Programming |
← prev | next → | CITS2002 | CITS2002 schedule | |||
Adding items to our stack data structureAs a program's execution progresses, we'll need to add and remove data items from the data structure.The need to do this is not known until run-time, and data (perhaps read from file) will determine how large our stack eventually grows. As its name suggests, when we add items to our stack, we'll speak of pushing new items on the stack, and popping existing items from the stack, when removing them.
We use a NULL pointer to represent the condition of the stack being empty.
CITS2002 Systems Programming, Lecture 19, p3, 3rd October 2023.
|