2

Use the tools the library provides
You can greatly simplify your string manipulations by using std::string::replace, e.g.
std::string inside_parentheses{input.substr(idx_open_bracket+1, idx_close_bracket-idx_open_bracket-1)};
// perform operations inside parentheses ( )
parseMultDivMod(inside_pa...