1, container = data structure + algorithm. It is equivalent to designing something that is designed to hold that data for complex data. Used to transfer complex data in development. 2, the template function can only be written in the header file. Statements cannot be made alone. 3, STL container classes are divided into three categories: (1), the sequence of container class vector array. The query is fast, but the insertion is slow. The order of data added is related to the size. An array of deque. Slower than vector queries, but inserts are a little faster than deque. A hash mapping is used. List linked list. Insert fast, query slow (2), associative container: The biggest difference from the order container class is that the container class has nothing to do with the order of accession, which is sorted when it is inserted. The set element cannot be repeated multiset can duplicate a map key-value pair (a property file is a key-value pair) stored in a key-value pair. The key name cannot be duplicated. stored in order, sorted by key Multimap is the same as map, but can be repeated (3), container adapter stack queue Priority_queue
C + + Learning Transcript 4