Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Apress/beginning-cpp20
/ countWords
Function
countWords
Examples/Modules/Chapter 20/Ex20_05/Ex20_05.cpp:56–62 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
54
}
55
56
WordCounts countWords(const Words& words)
57
{
58
WordCounts result;
59
for (auto& word : words)
60
++result[word];
61
return result;
62
}
63
64
size_t maxWordLength(const WordCounts& wordCounts)
65
{
Callers
1
main
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected