Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocxs committed Mar 25, 2015
1 parent 8061ce1 commit b9d0afc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ch09/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,15 @@ vector<int>::iterator find(vector<int>::iterator beg, vector<int>::iterator end,
```cpp
list<int> lst1;
list<int>::iterator iter1 = lst1.begin(), iter2 = lst1.end();
while (iter1 < iter2) /*ERROR: operator< cannot be used in list*/
while (iter1 < iter2) /*ERROR: operator< can't be applied to iterator for list*/
```

Fixed:
```cpp
while(iter1 != iter2)
```

#### note:
operator `<` can be used in `list`,but can't be applied to iterator for `list`.
## Exercise 9.7:
>What type should be used as the index into a vector of ints?
Expand Down

0 comments on commit b9d0afc

Please sign in to comment.