https://ide.codingblocks.com/s/357489.please check and mark out my mistakes.
Code gives two errors
why this errors came?,when i checked for small parenthesis ,it’s work fine.
hey @Nikhil-Jettley-2567269533523013 that’s because stack.top() gives reference to the top most element of the stack & not that element. Due to which you will get error. What you can do is do this https://ide.codingblocks.com/s/357520, but lemme tell you that the implementation you have applied will not work. So this is just one correction of your code. Now you won’t get that error but you have to think about your implementation now.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.