| 11 | void list_words(const vector<string>& words); |
| 12 | |
| 13 | int main() |
| 14 | { |
| 15 | std::string text; // The string to be searched |
| 16 | std::cout << "Enter some text terminated by *:\n"; |
| 17 | std::getline(std::cin, text, '*'); |
| 18 | |
| 19 | const std::string separators {" ,;:.\"!?'\n"}; // Word delimiters |
| 20 | std::vector<std::string> words; // Words found |
| 21 | |
| 22 | find_words(words, text, separators); |
| 23 | list_words(words); |
| 24 | } |
| 25 | |
| 26 | void find_words(vector<string>& words, const string& text, const string& separators) |
| 27 | { |
nothing calls this directly
no test coverage detected