C ++ learning transcript 4 and learning transcript 4

Source: Internet
Author: User

C ++ learning transcript 4 and learning transcript 4
1. Container = Data Structure + algorithm. It is equivalent to designing something specifically used to store the complex data. It is used to transmit complex data during development. 2. The template function can only be written in the header file. It cannot be declared separately. 3. STL containers are classified into three types: (1) ordered containers are vector arrays. Fast query, but slow insertion. The added data sequence depends on the size. Deque array. It is slower than vector query, but insert is a little faster than deque. Hash ing is used. List. Fast insertion, slow query (2), and associated containers: The biggest difference with the sequential container class is that the content of the container class is irrelevant to the order of addition, and will be sorted during insertion. Set elements cannot be repeated. You can repeat map key-value pairs (attribute files are composed of key-value pairs). They are stored in key-value pairs. Duplicate key names are not allowed. The storage is ordered. The multimap and map are sorted by the key, but they can be repeated (3). Container adapter stack queue priority_queue

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.