July 2000
Intermediate to advanced
1280 pages
34h 55m
English
Scope rules and the variety of storage classes in C++ go a long way toward helping programmers to manage memory for program objects. However, these tools do not solve the problem of implementing dynamic data structures adequately.
Array implementations of dynamic data structures with a sentinel or a count of valid entries are powerful and simple. When the number of elements in the data set grows or shrinks, these implementations can add or remove components. Yet they need the maximum size of the data set known at compile time. Any choice of the maximum size might entail either a danger of overflow or wasted space.
Dynamic memory management resolves this problem by allocating and reallocating memory dynamically. ...
Read now
Unlock full access