stacks..

pls help me deal with this program pls. im really new to programming and i cant do it by myself..
pls help.
all i need to do is just simply program arithmetic(i mean, a program that would solve addition, subtraction,multiplication and division) using stacks.. pls help me..
thanks a lot.

im doing them in the main functions..
this is all ive got..

int main(){
int num1,num2,s,sub,mul,div;
stack<int> s;
s.push(num1+num2);
}

----this is all ive got. pls help me..
People who try to get the more experienced c++ programmers of this form to do their homework for them make it harder on people like myself who really want to learn. :(

all i need to do is just simply program arithmetic(i mean, a program that would solve addition, subtraction,multiplication and division) using stacks.. pls help me..

Can you give an example of usage ? How exactly shall code work ? Give an exact explanation.
It sounds like he wants to create a calculator with a stack (or vector) that uses Reverse Polish Notation.

-Albatross
Topic archived. No new replies allowed.