Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering C++ Programming

You're reading from   Mastering C++ Programming Modern C++ 17 at your fingertips

Arrow left icon
Product type Paperback
Published in Sep 2017
Publisher Packt
ISBN-13 9781786461629
Length 384 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Jeganathan Swaminathan Jeganathan Swaminathan
Author Profile Icon Jeganathan Swaminathan
Jeganathan Swaminathan
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. C++17 Features 2. Standard Template Library FREE CHAPTER 3. Template Programming 4. Smart Pointers 5. Developing GUI Applications in C++ 6. Multithreaded Programming and Inter-Process Communication 7. Test-Driven Development 8. Behavior-Driven Development 9. Debugging Techniques 10. Code Smells and Clean Code Practices

Associative containers

Associative containers store data in a sorted fashion, unlike the sequence containers. Hence, the order in which the data is inserted will not be retained by the associative containers. Associative containers are highly efficient in searching a value with O( log n ) runtime complexity. Every time a new value gets added to the container, the container will reorder the values stored internally if required.

The STL supports the following types of associative containers:

  • Set
  • Map
  • Multiset 
  • Multimap
  • Unordered set
  • Unordered multiset
  • Unordered map
  • Unordered multimap

Associative containers organize the data as key-value pairs. The data will be sorted based on the key for random and faster access. Associative containers come in two flavors:

  • Ordered 
  • Unordered

The following associative containers come under ordered containers, as they are ordered/sorted...

You have been reading a chapter from
Mastering C++ Programming
Published in: Sep 2017
Publisher: Packt
ISBN-13: 9781786461629
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime