template
Library, standard template library. This is probably the most boring term of one of the most exciting tools in history. Fundamentally speaking, STL is a collection of "containers", such as linked list, vector, set, map and so on. STL is also a collection of algorithms and other components. The collection of "containers" and algorithms here refers to the masterpieces of many smart people in the world for many years.
The purpose of STL is to standardize components so that ready-made components can be used without secondary development. STL is now a part of C++, so there is no need to install anything else. It is built into your compiler. Because STL's list is a simple container, I intend to introduce how to use STL from it. Understand this concept and everything else will be fine. In addition, as we will see, the list container is very simple.
In this article, we will see how to define and initialize a list, count the number of its elements, find elements from the list, delete elements, and other operations. To this end, we will discuss two different algorithms. STL general algorithm can operate multiple containers, and the member function of list is the exclusive operation of list containers.
This is a brief overview of the three main types of STL components. STL containers can store objects, built-in objects and class objects. They will safely save the object and define the interface of this object that we can operate. Eggs placed on the egg rack will not roll on the table. They are safe. Therefore, the objects in the STL container are also safe. I know this metaphor sounds old-fashioned, but it is correct.
STL algorithms are standard algorithms, and we can apply them to objects in those containers. These algorithms have very famous execution characteristics. They can sort, delete, count, compare, find special objects, merge them into another container, and perform other useful operations.
/255/ 19 10755.shtml
There is another explanation:
What is STL?
STL stands for scientific literacy, but the hidden meaning behind this phrase is for everyone.
STL may be simply regarded as a philosophical point of view, but it is by no means just that. It includes a whole set of educational methods, including science and technology in life and everyone's thoughts, including not only teachers and students in schools, but also ordinary citizens and politicians.
In order to meet the requirements of popularizing science and technology, we should fundamentally change the exclusiveness of science and technology and the attitude of teachers/scientists towards science education.
Science education in the classroom should be liberated from the teacher-led and syllabus-centered education model, and instead design, guide and organize teaching with students as the center. It is very important for students to devote themselves to learning motivation. Only when technology becomes the demand of students' daily life will it be stimulated.
In view of this, we are now a part of the modern world, and this awareness is stronger than before, and the acquisition of knowledge is increasingly irrelevant to the memory of facts. Micro-phones can access the Internet directly. This is the ability to express some factual information at our fingertips. In this way, it is obviously meaningless for students to learn a lot of facts (that is, knowledge that is quickly outdated).
Once these burdens are lightened, the potential of science and technology can be discovered by all students. Science and technology are no longer just regarded as the wealth of the "brightest" students. Critical thinking is liberated. These thinking methods can reveal challenging and unreliable information and unfounded personal opinions, whether they come from' experts', advertising companies or politicians.
The exclusiveness of many existing technologies has created an atmosphere in which morality and values come from art and humanity. In fact, many at present