Primary knowledge of STL in C + +

Source: Internet
Author: User

First, the STL refers to the standard template Library, the C + + standards Templates Gallery, also known as the generic library.

STL provides three types of components: containers, iterators, and algorithms, all of which support generic program design standards.

(a) Container:

Divided into: sequential containers and associative containers. Sequential containers include vector,list,deque,string, etc., and a series of elements that have a continuation set. The associative container includes Set,multiset,map and Multimap, and so on, containing the key value of the lookup element.

(b) Iterators: As the name implies is iterative, the role is to traverse the container.

(c) algorithm: Sorting algorithm, immutable algorithm, non-variable order algorithm, variable order algorithm, numerical algorithm.

Second, these library functions need to refer to the header file before they can be used, as listed below:

<algorithm>, <deque>, <functional>, <iterator>, <vector>, <list>, <map>, <memory> , <numeric> , <queue> , <set> , <stack> and <utility>.

We will learn the knowledge of this place in succession. Consolidate themselves.

Primary knowledge of STL in C + +

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.