Can I get the element number output from a vector of strings?
If I have MyVector = "zero, one, two, three" and I input "one", is there a way to match that to the "one" in MyVector and output its position, i.e. "1"? edit for clarity vector<string> MyVector = {"zero", "one", "two", "three"}
Posted Jul 16, 2017, 9:23 PM UTC · edited
26