cout << "Words beginning with 'ca': " << endl; for (int i = 0; i < words.size(); i++) { if (words[i].substr(0, 2) == "ca") /// OR: words[i].find("ca") == 0 { cout << words[i] << endl; } total += words[i].length(); }
// Prefix is recommanded const char *PREFIX_MOVIE = "ca";
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)