For example I have the following string,
if (str[i] == \'(\' || str[i] == \')\' || str[i] == \'+\' || str[i] == \'-\' || str[i] == \'/\' || s
Not glorious because it is C instead of C++, but the C standard library is always accessible from C++ code, and my first idea as an old dinosaur would be:
if (strchr("()+-/*", str[i]) != NULL)
Simple and compact