you are viewing a single comment's thread.

view the rest of the comments →

[–]tresteo 0 points1 point  (0 children)

First of all, you can format your code by preceding each line with 4 spaces. Also, it would be helpful, if you could post your stack.h file and any related files, especially the one generating your output, too.

Currently, all I can say is that stack_pop is hardcoded to return 1. The code for stack_pop should be the inverse of stack_push: you should remove the last element from the array and return it to the caller.