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:

http://pastebin.com/ffbAEZex

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

http://pastebin.com/z7z1t02a

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.