Skip to Main Content
Professional C++, 3rd Edition
book

Professional C++, 3rd Edition

by Marc Gregoire
September 2014
Intermediate to advanced content levelIntermediate to advanced
984 pages
25h 22m
English
Wrox
Content preview from Professional C++, 3rd Edition

Chapter 16Understanding Containers and Iterators

  • Explaining iterators
  • Containers Overview: requirements on elements, general error handling, and iterators
  • Sequential Containers: vector, deque, list, forward_list, and array
  • Container Adapters: queue, priority_queue, and stack
  • Associative Containers: the pair utility, map, multimap, set, and multiset
  • Unordered Associative Containers/Hash Tables: unordered_map, unordered_multimap, unordered_set, and unordered_multiset
  • Other Containers: standard C-style arrays, strings, streams, and bitset

Please note that all the code examples for this chapter are available as a part of this chapter’s code download on the book’s website at www.wrox.com/go/proc++3e on the Download Code tab.

Chapter 15 introduces the STL, describes its basic philosophy, and provides an overview of the various containers and algorithms. This chapter begins a more-in-depth tour of the STL by covering the STL containers. A detailed list of available classes and methods can be found in a Standard Library Reference; for example, http://www.cppreference.com/ or http://www.cplusplus.com/reference/.

The next chapters go deeper on topics such as algorithms, regular expressions, and how you can customize and extend the STL.

CONTAINERS OVERVIEW

Containers in the STL are generic data structures useful for storing collections of data. You should rarely need to use a standard C-style array, write a linked list, or ...

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

Professional C++, Second Edition

Professional C++, Second Edition

Marc Gregoire, Nicholas A. Solter, Scott J. Kleper
Expert C++ - Second Edition

Expert C++ - Second Edition

Marcelo Guerra Hahn, Araks Tigranyan, John Asatryan, Vardan Grigoryan, Shunguang Wu

Publisher Resources

ISBN: 9781118858134Purchase book