Skip to Main Content
C++ Primer Plus, Fourth Edition
book

C++ Primer Plus, Fourth Edition

by Stephen Prata
November 2001
Beginner content levelBeginner
1128 pages
29h 12m
English
Sams
Content preview from C++ Primer Plus, Fourth Edition

Members Common to All Containers

All containers define the types in Table G.1. In this table, X is a container type, such as vector<int>, and T is the type stored in the container, such as int.

Table G.1. Types Defined for All Containers
Type Value
X::value_type T, the element type
X::reference Behaves like T &
X::const_reference Behaves like const T &
X::iterator Iterator type pointing to T, behaves like T *
X::const_iterator Iterator type pointing to const T, behaves like const T *
X::difference_type Signed integral type used to represent the distance from one iterator to another; for example, the difference between two pointers
X::size_type Unsigned integral type size_type can represent size of data objects, number of elements, and subscripts ...
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

C++ Primer Plus, Fifth Edition

C++ Primer Plus, Fifth Edition

Stephen Prata
C++ All-In-One For Dummies®, 2nd Edition

C++ All-In-One For Dummies®, 2nd Edition

John Paul Mueller, Jeff Cogswell
C++ Primer Plus

C++ Primer Plus

Stephen Prata

Publisher Resources

ISBN: 0672322234Purchase book