当前位置:网站首页>STL notes (I): knowledge system
STL notes (I): knowledge system
2022-07-25 05:06:00 【Reyn Morales】
STL note ( One ): Knowledge system
STL overview

Standard template library (Standard Template Library,STL) yes C++11 The content in . In the standard library , Provides the most basic algorithm 、 Containers and related iterators . If you can understand the use of containers and algorithms , It will effectively improve our development efficiency . We should use them as much as possible , Instead of rejecting them , As C++ Advanced content of , every last C / C++ Engineers should master them .
This article is STL The opening of the notes column , A brief introduction STL What is it? . In subsequent articles , Each article will briefly introduce some contents in the overview , The length is mainly code , Including example program and actual combat program . in addition , Some articles also have the author's summary and thinking , I hope it can help you understand .
STL frame
STL The basic usage mode is shown in the following figure , Containers are used to hold data , We use the iterators provided by each container to complete the increment 、 Delete 、 Change 、 Check and other basic operations . Besides , We can also use STL Provide algorithms to realize a certain function , The use of the algorithm is still inseparable from the container , The two are associated through iterators provided by each container .

STL Templates
So let's see STL Principle of main contents , The essence of container is data structure , The main technology of implementation is class template , The essence of iterators is pointers , The main technology of implementation is class object , The essence of algorithm is function , The main technology of implementation is function template .
| Content | understand | Realization |
|---|---|---|
| Containers | data structure | Class template |
| iterator | The pointer | Class object |
| Algorithm | function | Function templates |
In order to learn better STL, We start from the principle of implementation , In the next article , We will learn about templates and extraction and operator overloading
边栏推荐
- 2022-07-24: what is the output of the following go language code? A:[]int{}; B:[]int(nil); C:panic; D: Compilation error. package main import ( “fmt“ ) f
- Introduction to FileStream class of C #
- Why does the official not recommend using UUID as MySQL primary key
- Teach you how to locate unreasonable SQL? And optimize it
- The 6th "Blue Hat Cup" National College Students' Cyber Security Skills Competition writeup
- DOM在Ahooks中的处理过程
- When we talk about immutable infrastructure, what are we talking about
- Gbase JDBC connection database exception
- How can I check if the number of RDS links in MySQL suddenly rises?
- etcd学习
猜你喜欢

初步了解Panda3d粒子系统

Document collaboration tool recommendation

Solve the problem that uni app applet obtains routes and route parameters

Forwarding and sharing function of wechat applet
![[c language] custom type (structure ~ enumeration ~ Union)](/img/24/f4ccccef5977c6f465284402487fa2.png)
[c language] custom type (structure ~ enumeration ~ Union)

Redis集群搭建(Windows)

Wechat official account all article download links to get

JS common code questions array de duplication - Custom New throttling and anti shake - deep copy - instanceof URL parameter extraction - thousand separator - array to tree structure - array flattening
[email protected]研发效能度量指标"/>学习记录[email protected]研发效能度量指标

教你如何定位不合理的SQL?并优化之
随机推荐
85 distributed project construction
How to judge whether it is attacked by DDoS
Unity LOD
four hundred and forty-four thousand one hundred and forty-one
Actual combat | record an attack and defense drill management
Web: compiling big refactoring from 10 to 1
unity 3D物体添加 点击事件
Implementation of recommendation system collaborative filtering in spark
Get the parameters of the browser address bar
Style transfer -- CCPL: contrast coherence preserving loss for versatile style transfer
STM32 Development Notes 121: Kalman filter I understand
Ora-01460: conversion request cannot be implemented or unreasonable
2022-7-13 summary
Most of the time, it's probability
Implementation principle of epoll
2022-07-24:以下go语言代码输出什么?A:[]int{};B:[]int(nil);C:panic;D:编译错误。 package main import ( “fmt“ ) f
STM32 Development Notes 119: what macros are required to enable FPU?
Idea2021 installation
小说抓取实战
JS common code questions array de duplication - Custom New throttling and anti shake - deep copy - instanceof URL parameter extraction - thousand separator - array to tree structure - array flattening