summaryrefslogtreecommitdiff
path: root/01-26.md
diff options
context:
space:
mode:
Diffstat (limited to '01-26.md')
-rw-r--r--01-26.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/01-26.md b/01-26.md
index da4652c..f7919d1 100644
--- a/01-26.md
+++ b/01-26.md
@@ -7,7 +7,7 @@
### Introduction
- The container classes' capacity is declared as a **constant** in the class definition (`bag::CAPACITY`)
-- If we need bigger bages, then we can increase the constant and recompile the code
+- If we need bigger bags, then we can increase the constant and recompile the code
- What if a program needs one large bag and many small bags?
- All the bags will be of the same size!
@@ -123,7 +123,7 @@ d_ptr = new double[10];
### Address Space Segmentation
-![diagram](01-26_2.md)
+![diagram](01-26_2.png)
### Stack Memory
@@ -172,7 +172,7 @@ delete [] example_ptr;
**Stack overflow** is the result of:
- Allocating too many variables on the stack
-- Making too many nested function valls
+- Making too many nested function calls
- Example: Where function A calls function B calls function C calls function D...
- Stack overflow generally causes a program to crash
@@ -191,7 +191,7 @@ int main(){
- The `new` operator usually indicates failure by throwing an exception called the `bad_alloc` exception
- Normally, an exception causes an error message to be printed and the program to halt
- Alternatively, a programmer can "catch" an exception and try to fix the problem
- - **Exceptions** provide a way to reacto to exceptional circumstances (like runtime errors) in programs
+ - **Exceptions** provide a way to react to to exceptional circumstances (like runtime errors) in programs
- When an exception is thrown, control is transferred to its **handler**
### Example 1