Im having trouble grasping the concept of RPN. I have to read it and evaluate using stack
1 2 3 4 5 6 7
|
// im reading it in as a string
string prefix;
cout << "Enter: ";
cin >> prefix;
// then I convert it to integer
atoi(prefix.c_str())
|
but then how do i differentiate from a number and an operand?
Any help would be appreciated
Last edited on