#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <string> #include <stack> #include <map> using namespace std; int main() { char str[1000] = { 0 }; map<char, int> priority = { // 定义运算优先级 {'\0', 0}, // 结束符优先级最低 {'+', 1}, {'-', 1}, ...