I have to follow the Command Pattern in making a reverse polish notation calculator in C++. It needs to do undo and redo. It's due tomorrow morning so I've been banging my head against the table everyday for the last two weeks even tho I know its probably very easy and I'm just over thinking it... specifically I'm having problems understanding how the operators / operands on a stack stored in main() can be accessed (ie. push answer from Calculator?) after calling the invoker (assume that I send the args from stacks in main to Invoker or ConcreteCommand or Command or Calculator), but in general just confused as to how the Invoker or Commands access the operators / operands and which classes are supposed to handle which functions?

I've posted the assignment here:


I posted the code I created (w/some questions I'm having in notes) here:


5 Years
Discussion Span
Last Post by WaltP

Sorry, but most of us won't download files. Everyone here posts their code (using CODE tags) and asks specific questions to get help. See the Member Rules.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.