利用vector存储每段计算结果 #include <cctype> #include <iostream> #include <vector> #include <string> using namespace std; // 测试用算术表达式 // 3+2*(1+2*(-4/(8-6)+7)) // -4/(-6+8) // -(3+2) // 计算算术表达式 lBound与rBound都参与计算,防止越界 int compute(const string& s, int lBound, int rBound) { // 初始化运算符...