Skip to content

Commit

Permalink
update 11.21
Browse files Browse the repository at this point in the history
  • Loading branch information
Mooophy committed Oct 24, 2015
1 parent 76d6e98 commit 57f587f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ch11/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,14 @@ std::multiset<Sales_data, compareType>::iterator c_it = bookstore.begin();
while (cin >> word)
++word_count.insert({ word, 0 }).first->second;
```
```cpp
This code can be explained like this pseudocode:
```java
while reading into word
if word_count has key word:
word_count[word] += 1
else:
word_count[word] = 0
word_count[word] += 1
++ (word_count.insert({ word, 0 }).first->second)
```
## Exercise 11.22:
Expand Down

0 comments on commit 57f587f

Please sign in to comment.