8
I want to find the location of + or - in a complex number , e.g.
x + y*i
x - y*i
Usually , I will do this :
int found = str.find("+");
if (found != string::npos)
cout << "'+' also found at: " << found << endl;
found = str.find("-");
if (found != string::npos)
cout << "'-' also found at: " << found << endl;
How can I give find multiple options to find in a single run ?