This article for the post, because the original operation in Linux, I under the Vc6/7 debugging, made a partial modification! Note: All code is debugged under VC6/VC7! Standard Template Library (STL) Introduction
Standard Template Library (STL) Introduction
0 preface.
1 Define a list
2 Insert an element into the list using the member functions of the list push_back and Push_front
member functions of the 3 list empty ()
4 using a For loop to work with the elements in the list
5 using STL general algorithm For_each to deal with the elements in the list
6 using STL Universal Algorithm count_if () to count the number of elements in the list
7 A more complex function object using Count_if ().
8 using STL General algorithm find () Look up objects in list
9 using STL General Algorithm find_if () search for objects in list
10 using STL General algorithm search find a sequence in the list
11 use the member function of the list to sort () Order a list.
12 insert element into list with member function of list
The List constructor
14 using the list member function to remove elements from the list
15 Remove the element from the list using the list member function remove ().
16 Use STL General algorithm remove () delete element from list
17 Use STL General Algorithm stable_partition () and list member function splice () to divide a list
18 Conclusion
Using STL in Field
19 Bibliography: