diff --git a/lectures/04_pointers/README.md b/lectures/04_pointers/README.md index 25bdda6..cddbec1 100644 --- a/lectures/04_pointers/README.md +++ b/lectures/04_pointers/README.md @@ -141,6 +141,7 @@ int i; for ( i=0; i - Remember: the size of array a is fixed at compile time. STL vectors act like arrays, but they can grow and shrink dynamically in response to the demands of the application. @@ -172,7 +173,7 @@ the start of the array. In this example, a+n is the memory location 80 bytes aft slot). We could equivalently have used the test p != a+n - In the assignment: ```cpp -*p = sqrt( p-a ) +*p = sqrt( p-a ); ``` *p-a* is the number of array locations (not number of types, although each slot is 8 bytes) between p and the start. **This is an integer**. The square root of this value is assigned to \*p. @@ -192,11 +193,11 @@ double *p; p = a; int i; for ( i=0; i