Standard Template Library STL

Generic programming

Simply put, it is to use a template programming method.
Some commonly used data structures (such as linked lists, arrays, binary trees)
and algorithms (such as sort, search) written template, thereafter, regardless of the data
structure put in is what objects, the algorithm for what kind of object, you will
not have to re-implement data structure, re-write algorithm.
Is a Standard Template Library (Standard Template Library)
collection of templates some common data structures and algorithms.
With STL, without having to write standard data structures and algorithms most of,
and achieved very high performance.

Container : can accommodate various data types generic data structure is a class template
iterator : access elements may be used sequentially container, similar pointer
arithmetic : template element function for operating the container
 sort () to one sort the data in the vector
 find () searches for an object in a list of
the algorithm regardless of the type of data with their own operations, and therefore they may be from a simple array to
use any highly complex data structure of the container.

Published 52 original articles · won praise 0 · Views 678

Guess you like

Origin blog.csdn.net/UniversityGrass/article/details/104758790