8 C++STL set/multiset container details

2.8.1 introduction set/multiset container concept Set and multiset are a collection container, in which the elements contained in set are unique, and the elements in the collection are automatically arranged in a certain order. Set is implemented using the data structure of red black tree variant, which belongs to balanced binary tree. ...

Posted by hiberphoptik on Wed, 13 Oct 2021 02:42:50 +0200

Detailed explanation of c + + priority_queue

catalogue 1. Content: 2. Examples: 1) Examples of basic types: 2) For pair comparison, first compare the first element, the first is equal, and the second is equal   3) For custom types   3. Common uses:   1. Content: Since it is a queue, the header file #include < queue > must be included first. The difference betw ...

Posted by washbucket on Tue, 21 Sep 2021 08:30:37 +0200

STL learning notes string

STL learning notes (I) string c_str() const char *c_str(); c_ The str() function returns a pointer to the normal C string, with the same content as this string string s="123" printf("%s",s.c_str()) Add: insert() iterator insert( iterator i, const char &ch ); basic_string &insert( size_type index, const basic_string & ...

Posted by derrick24 on Sun, 19 Sep 2021 20:41:52 +0200