Skip to Main Content
Practical C++
book

Practical C++

by Rob McGregor
August 1999
Beginner to intermediate content levelBeginner to intermediate
912 pages
15h 44m
English
Que
Content preview from Practical C++

Chapter 24. Implementing Dynamic Storage in C++

<feature>
  • Understand the benefits of container classes

  • Learn about dynamic arrays

  • Create a dynamic array class

  • Learn about linked lists

  • Create a linked list class

</feature>

Container Classes

What do barrels, gas tanks, grocery bags, and milk cartons have in common? They’re all containers, and people use containers to store things. When you design a program, it’s often convenient to store similar data in containers of some sort. C++ classes are a great way to create dynamic containers that hold collections of objects while automatically handling memory management.

One common type of container is an array, a built-in feature of C++ you learned about in Chapter 6, “Using Arrays.” Another common type of container ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical C++ Programming, 2nd Edition

Practical C++ Programming, 2nd Edition

Steve Oualline
C++ Cookbook

C++ Cookbook

D. Ryan Stephens, Christopher Diggins, Jonathan Turkanis, Jeff Cogswell

Publisher Resources

ISBN: 0789721449Purchase book