C++ Postfix calculator using stacks

When you have a number – you are pushing on its ASCII value.

You need to push on its value so change

pile.push(symbole);

to

pile.push(symbole - '0');

Leave a Comment