2013-11-30

I am doing infix to post fix notation. my program complies, although, for some reason it will not take in any infix expressions, only postfix expressions. Which is the opposite I wanted to do. Here is my program:

Here is what I know:

If you run the program at this current state it will take Postfix notation: 1 2 + and covert it to postfix. This is not what I wanted

The problem occurs at lexpr = postfixstack.top(); top is a pointer to the first node in the stack. I think that when I try to pop something off, there isn't anything to pop off so it goes into error. I am not sure how to fix this.

When the user places in a infix noation: 1 + 2, the program crashes.

Show more