to determine if part of a string is an operand, i have something like this:
am i headed in the right direction or is there a built in function for something like this?Code:bool isOperand(int pos, string op) { if (op.substr(pos, 1) == '(' || op.substr(pos, 1) == ')' || op.substr(pos, 1) == '+' || op.substr(pos, 1) == '-' || op.substr(pos, 1) == '*' || op.substr(pos, 1) == '/') return true; else return false; }
thanks