diff --git a/lectures/06_memory/README.md b/lectures/06_memory/README.md index 22cb1cf..0302bf9 100644 --- a/lectures/06_memory/README.md +++ b/lectures/06_memory/README.md @@ -21,11 +21,14 @@ static int counter; ## 6.2 Dynamic Memory Dynamic memory is: -- created using the new operator, +- created using the **new** operator, - accessed through pointers, and -- removed through the delete operator. +- removed through the **delete** operator. Here’s a simple example involving dynamic allocation of integers: +
| ```cpp int * p = new int; *p = 17; @@ -42,6 +45,11 @@ cout << *p << " " << *q << endl; delete p; delete q; ``` + | +
+ |