210 likes | 374 Views
Intro to C STL Containers. GoalsSee how STL containers are implementedSee how differences in implementation affect useWe'll cover several kindsFocus on template conceptsAnd how each container's concept relates to its implementationExample to the left printsv[0] is 1v[1] is 2v[2] is 4.
E N D
1. Review: C++ Standard Template Library (STL) The STL is a collection of related software elements
Containers
Data structures: store values according to a specific organization
Iterators
Variables used to give flexible access to the values in a container
Algorithms
Functions that use iterators to access values in containers
Perform computations that modify values, or creates new ones
Function objects
Encapsulate a function as an object, use to modify an algorithm
The STL makes use of most of what weve covered
Functions, classes, structs
Extensive use of function and class templates, concepts
Typedefs, traits, and associated types
2. Intro to C++ STL Containers Goals See how STL containers are implemented See how differences in implementation affect use Well cover several kinds Focus on template concepts And how each containers concept relates to its implementation Example to the left prints v[0] is 1 v[1] is 2 v[2] is 4