MCPcopy Create free account
hub / github.com/Apress/beginning-cpp20 / main

Function main

Examples/Modules/Chapter 08/Ex8_08.cpp:13–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11void list_words(const vector<string>& words);
12
13int 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
26void find_words(vector<string>& words, const string& text, const string& separators)
27{

Callers

nothing calls this directly

Calls 2

find_wordsFunction · 0.70
list_wordsFunction · 0.70

Tested by

no test coverage detected