Skip to content

Commit

Permalink
book: typo fixes (changkun#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
TianyiShi2001 authored Nov 15, 2020
1 parent 6a3d8d7 commit 56de7fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions book/en-us/02-usability.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ E.g:
int main() {
std::vector<int> vec = {1, 2, 3, 4};

// after c++17, can be simplefied by using `auto`
// since c++17, can be simplified by using `auto`
const std::vector<int>::iterator itr = std::find(vec.begin(), vec.end(), 2);
if (itr != vec.end()) {
*itr = 3;
Expand All @@ -214,7 +214,7 @@ int main() {
*itr = 4;
}

// should output: 1, 4, 3, 4. can be simplefied using `auto`
// should output: 1, 4, 3, 4. can be simplified using `auto`
for (std::vector<int>::iterator element = vec.begin(); element != vec.end(); ++element)
std::cout << *element << std::endl;
}
Expand Down

0 comments on commit 56de7fa

Please sign in to comment.