#include using namespace std; int main() { char slash {'\\'}; // 01234567890 1234567 string word{"this is a \\ phrase i think"}; string first, second; size_t pos; cout << "slash is " << slash << endl; cout << "word is " << word << endl; pos = word.find(slash); cout << slash << " is at position " << pos << " in " << word << endl; cout << endl; first = word.substr(0,pos); second = word.substr(pos+1, string::npos); cout << "The first part of the string is \"" << first << '"' << endl; cout << "The second part of the string is \"" << second << '"' << endl; string searchVal{"i"}; pos = word.find(searchVal); while (pos != string::npos) { cout << "found " << searchVal << " at " << pos << endl; pos = word.find(searchVal, pos + 1); } return 0; } // // string number; // string value, label; // cin >>number; // in the form value:label // // split these into to value and label // if (label == "deci") { // Call DecimalStringToInteger // } else if (label == "murn") { // Call UrnfieldStringToInteger // } else if (label == "maya") { // Call MayanStringToInteger // } else { // print an error // } //