KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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 ?
Tags (comma-separated)
Save Edits
Cancel