Stacks

Feb 10, 2010 at 9:19am
////
Last edited on Feb 11, 2010 at 2:24am
Feb 10, 2010 at 1:42pm
This doesn't make sense:

1
2
3
4
if ((!error) && isEmpty(s))
    cout<<"\nResult: This expression is not balanced. \n"<<endl;
else
    cout <<"\nResult: This expression is balanced. \n"<<endl;


The expression is not balanced if error is true (too many closing parens)
OR if the stack is NOT empty (too few closing parens).

Feb 10, 2010 at 7:50pm
thanks for the reply works now

Last edited on Feb 11, 2010 at 2:25am
Topic archived. No new replies allowed.