#include #include #include void main() { while (true) { cout << "enter an expression: "; string line; getline(cin, line); cout << "line is '" << line << "'\n"; istringstream iss(line + " END!"); string r = ""; while (true) { string s; iss >> s; if (iss.fail()) break; cout << " partial result: " << s << "\n"; if (s == "END!") break; r += s; } cout << "result = " << r << "\n"; } }