Skip to content

Commit

Permalink
Fixed pezy#97
Browse files Browse the repository at this point in the history
  • Loading branch information
pezy authored Dec 21, 2016
1 parent f17a0bc commit 397ff8b
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions ch03/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,6 @@ Are there values of p1 or p2 that make this code illegal?
p1 += p2 - p1;
```

we assume p1 and p2 point to an array arr. so `p1 = &arr[0]`; and `p2 = &arr[0]`.
p2 - p1 is the distance of arr[0] to arr[0], and must be zero.
so `p1 += 0;` can not change the p1's point.

`p1 += p2 - p1;` same as `p1 = p2;`. If p2 and p1 are legal, this code always legal.

##[Exercise 3.35](ex3_35.cpp)
Expand Down

0 comments on commit 397ff8b

Please sign in to comment.