C + + Sets

Source: Internet
Author: User

A collection (set) is an associative container that contains sorted objects

Begin ()

Returns an iterator that points to the first element

Clear ()

Clear all elements

Count ()

Returns the number of a value element

Empty ()

Returns True if the collection is empty

End ()

Returns an iterator that points to the last element

Equal_range ()

Two iterators that return the upper and lower bounds of the collection equal to the given value

Erase ()

To delete an element in a collection

Find ()

Returns an iterator that points to the element being found

Get_allocator ()

Returns the allocator for the collection

Insert ()

Inserting elements in a collection

Lower_bound ()

Returns an iterator that points to the first element greater than (or equal to) a value

Key_comp ()

Returns a function for comparing values between elements

Max_size ()

Returns the maximum limit of the elements that a collection can hold

Rbegin ()

Returns a reverse iterator that points to the last element in the collection

Rend ()

Returns a reverse iterator that points to the first element in the collection

Size ()

The number of elements in the collection

Swap ()

Swap two set variables

Upper_bound ()

Returns an iterator that is greater than a value element

Value_comp ()

Returns a function to compare the values between elements

 

C + + Sets

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.