previous
|
index
|
next
One Solution
Rewrite
push!
to check if stack is full and create a new one on the fly if it is (Exercise 13.9).
Advantage:
Program will not crash with error
Disadvantages:
Takes time to copy the vector.
Vector may be under-used
previous
|
index
|
next