Skip to content
Snippets Groups Projects
Commit 70dd7385 authored by Boris Stefanovic's avatar Boris Stefanovic
Browse files

COMMENT: added TODOs and commented code in stack_print to prep for to-be-implemented functions

parent e66d9cd7
No related branches found
No related tags found
1 merge request!12Add stack_print(stack) function
...@@ -18,6 +18,8 @@ void stack_peek(stack s, int *value){ ...@@ -18,6 +18,8 @@ void stack_peek(stack s, int *value){
} }
void stack_print(const stack s) { void stack_print(const stack s) {
//TODO: replace if statement with following as soon as relevant function is implemented
//if (!stack_is_empty()) {
if (s.top >= 0) { if (s.top >= 0) {
printf(" TOP\n--------------------\n"); printf(" TOP\n--------------------\n");
for (int* spot = s.data + s.top; spot >= s.data; --spot) { for (int* spot = s.data + s.top; spot >= s.data; --spot) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment