hi all.
i want to ask something about stack.
my assignment require me to do the bracket checking.
for example if i find ( or { , i push it into a stack.
then if i find } or ), i pop the element that i pushed into the stack before.
how do i read the element in the top??
i've tried this way. s.top() == '{'
but it cannot be compiled.
anybody know about this? thanks. :)