From f61213a062c2619966879f7da6f25d8e77b61394 Mon Sep 17 00:00:00 2001 From: Jidong Xiao Date: Mon, 11 Sep 2023 23:04:29 -0400 Subject: [PATCH] adding the missing semi-colons --- lectures/04_pointers/README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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