| 5 | import <iostream>; |
| 6 | |
| 7 | int main() |
| 8 | { |
| 9 | words::Words the_words; |
| 10 | std::string text; // The string to be sorted |
| 11 | const auto separators{" ,.!?\"\n"}; // Word delimiters |
| 12 | |
| 13 | // Read the string to be processed from the keyboard |
| 14 | std::cout << "Enter a string terminated by *:" << std::endl; |
| 15 | getline(std::cin, text, '*'); |
| 16 | |
| 17 | words::utils::extract_words(the_words, text, separators); |
| 18 | if (the_words.empty()) |
| 19 | { |
| 20 | std::cout << "No words in text." << std::endl; |
| 21 | return 0; |
| 22 | } |
| 23 | |
| 24 | words::sorting::sort(the_words); // Sort the words |
| 25 | words::utils::show_words(the_words); // Output the words |
| 26 | } |
nothing calls this directly
no test coverage detected