C ++ learning: Container details (2), container details

Source: Internet
Author: User

C ++ learning: Container details (2), container details

From yesterday to now, I still stayed on the study of containers. Now I am writing routine code more easily. It seems that I still need to practice more to write code.

After one day of study, I have some knowledge points that make sense:

(1) When the elements in the container are deleted, the return values of the pop_front and pop_back functions are not the values of the elements to be deleted, but void, that is, the empty data type. If you want to return the values of the deleted elements, the front and back functions must be called before the elements are deleted.

(2) Delete an element and use erase to return an iterator pointing to the element after the deleted element or deleted element segment.

(3) The container capacity is larger than the size.

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.