int main()
{
map<string,size_t> count;
string word;
while(cin >> word)
count[word]++; --------(1)
for(auto it=count.begin();it!=count.end();++it)
cout << it->first << ": "<< it ->second <<endl;
I donot understand the code particularly the line (1)
Could anyone can explainÉ
skyyadav 0 Light Poster
kal_crazy 13 Junior Poster
Moschops 683 Practically a Master Poster Featured Poster
techofunda 0 Newbie Poster
techofunda 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.