Это код cpp. Я многое меняю, но могу исправить код. Пожалуйста, помогите мне. [code]void HandleOperator(char op, std::stack\&operandStack, std::stack\&operatorStack) {
if (operandStack.size() < 2) { MessageBox(nullptr, L"Insufficient operands for the operation", L"Error", MB_OK | MB_ICONERROR); PROGSTART(); return; }
int operand2 = operandStack.top(); operandStack.pop();
int operand1 = operandStack.top(); operandStack.pop();
int result = 0; switch (op) { case '+': result = operand1 + operand2; break; case '-': result = operand1 - operand2; break; case '*': result = operand1 * operand2; break; case '/': if (operand2 != 0) { result = operand1 / operand2; } else { MessageBox(nullptr, L"Cannot Divide by Zero", L"Error", MB_OK | MB_ICONERROR); PROGSTART(); return; } break; }
operandStack.push(result);
} [/code] [list] [*]this ->PROGSTRAT(); [/list] two PROGSTART(); have errors.