I need help with the output please. The program is good when entering the seven numbers but it dont output any number when entering the number seven number into a stack. The code below and thank you for taking your time to look at the code.
first of all this code is a fuckin mess.
please put the functions above the main and make some new line between functions.
it is just so much easier if main is always the last function and you can see where something starts or ends.
also dont change your counting index (top in your case), before you have actually changed the variable.
your emptystack() function is returning 1 if the stack is empty, but your while statement in line 25 only pops and prints stuff if emptystack returns 1.
Calling the pop function st.pop();
Sorry for the messing code, is the error in the while loop if so can you give me a example please?
I thought the error is within the output section of the code within the while loop?
would the conditions have to been while (!st.emptystack()) or no?
Thank for your help!
@Incis B Thank you very much I got it working. Thank you to very one here who left a comment to help. I am grateful for your time and help thank you very much. Incis B it was a easy mistake to fix thanks for the help Lool!!!