Use code tags to post relevant code with error messages. The error messages should be in order of presentation by the compiler, as frequently if you fix the first error message the others go away as well.
Example : If the stack initially such as Top_node -> 5 , 7, 8, 12, 15, 25, 32
After insertion( 20 ) it will be Top_node -> 5 , 7, 8, 12, 15, 20, 25, 32
Well the logic you need is simple:
Use two stacks - one already sorted and one that is empty (called temp).
Then when you get a new element, keep on popoing element from the sorted one and push them to the other temp one as long as the new element is larger.
Once you find the correct place for the new element, push it to the sorted stack, then pop the elemnts from the other temp stack and push into the sorted one. :D
Well you got to put all this into code ofcource :cool:
Why dont you post what you have alredy written so that others can have a look :idea: