Chapter 9: ordered containers

Source: Internet
Author: User
Tags define null

1: The container must support two types of operations. This type can be used as the elements of the container. First, the element type supports the value assignment operation, but the element type supports the object copy operation.

2: Special requirements for operations. For example, if the container element type is class type and the class only provides single-value initialization constructor, VEC (n) operations are not allowed, the class type cannot be initialized because there is no default constructor. However, VEC (n, 1) is supported)

3: when the container is used as an element, pay attention to writing. Double> spaces are required in the middle.

4: three sequential containers. Only list has no arithmetic operations. The value greater than or less than the value is not supported.

5: whether a container has a relational operation depends on whether the elements of the container have

6: The front and back operations in the container return a reference and must have elements. Otherwise, the operations are not fixed-the small mark operation also returns a reference.

7: When clear () is used, it is also possible to define null.

8: the assignment operation of the container must be of the same type and element type. The assign operation is different and can be compatible with the container type.

9: string is similar to a vector operation, except stack operations.

Chapter 9: ordered containers

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.