![]() |
Stack Implementation using Linked list
A Simple program for implementing Linked Stack
Code: Cpp
|
Re: Stack Implementation using Linked list
clrscr(); means it will not compile in the MS compiler. :eek:
|
Re: Stack Implementation using Linked list
I agree ur point (i.e clrscr() function not worked in MS Compiler)but I just run that program in Turbo compiler.
Regards Guna |
Re: Stack Implementation using Linked list
If you want it to run in MS compiler comment the clrscr line.
Also why don't you get some standard compiler as TC is pretty much outdated now. |
Re: Stack Implementation using Linked list
Hi,
I think you should use functions for the operations of the stack. Becuase you have written every thing in the main , so its increased the size of main and it looks complex. With the help of using functions i think its very easy to debug or understand the code. Another suggestion is to use the template class so that Stack can be used as a generic. like void Push(Node **Base,int Val) //May be the parameters are different according to your logic but you should use the function. { } int Pop() { } |
Re: Stack Implementation using Linked list
Ya........ I accepted
but it is for beginners..... |
Re: Stack Implementation using Linked list
In my compiler it is showing....
Code:
General Protection Exception |
Re: Stack Implementation using Linked list
What input did you give? (Include all data; both commands and node::data values given.)
Did you change the code? Or do you mean the compiler itself crashed when compiling the code? |
Re: Stack Implementation using Linked list
this program of stack using link list is very helpful for me. It is help full for the beginners..........
|
| All times are GMT +5.5. The time now is 20:26. |