adding recursion review question

This commit is contained in:
Jidong Xiao
2024-02-02 13:43:02 -05:00
parent 1e781ab89f
commit 850a381bff

View File

@@ -8,6 +8,17 @@
- Templated classes (including compilation and instantiation of templated classes)
- Copy constructors, assignment operators, and destructors
## Recursion Review
What is the value of fun(2)?
```cpp
int fun(int n) {
if (n == 4) return n;
else return 2*fun(n+1);
}
```
## 8.1 Vector Public Interface
In creating our own version of the STL vector class, we will start by considering the public interface: