Standard Template Library algorithm (all functions)
Catalog
Adjacent_find
All_of (returns true if all iterator intervals meet criteria, false otherwise)
Any_of (returns true if one of the iterator intervals meets the criteria, false otherwise)
Binary_search (binary search, find return true, otherwise return false)
Copy (copy an interval to the target iterator location)
Copy_backward (copy ...
Posted by cpace1983 on Sat, 09 Oct 2021 09:47:06 -0700
Detailed explanation of C++ STL (recommended collection!!!)
One of the purposes of writing this sharing is to write a summary so that you can review it at any time in the future. Another is to introduce what STL is and how to use STL to solve problems more efficiently and lazily to those Mengxin who don't know much about STL. This article will be updated for a long time. You are welcome to supervise you ...
Posted by reethu on Tue, 05 Oct 2021 14:44:40 -0700
1095 decoding PAT admission card (25 points)
PAT admission number consists of 4 parts:
The first is the level, that is, T stands for the top level; A stands for class A; B stands for class B; The 2nd to 4th digits are the examination room number, ranging from 101 to 999; The 5th ~ 10th place is the examination date, with the format of year, month and day, accounting for 2 places in seque ...
Posted by mdomel on Mon, 04 Oct 2021 13:53:38 -0700
STL Unit 1 String container
1. string container
1.1 string concept
Essence:
String is a C + + style string, and string is essentially a class. The difference between string and char *:
Char * is a pointer, string is a class, and char * is encapsulated inside the class. Managing this string is a char * type container.
string manages the memory allocated by char *. The ...
Posted by redbrad0 on Fri, 17 Sep 2021 22:49:56 -0700
Use and Simulation of stack and queue
1, stack introduction
template <class T, class Container = deque<T> > class stack;
(1). stack is a container adapter, which is specially used in the context with last in first out operation. Its deletion can only insert and extract elements from one end of the container.
(2) Stack is implemented as a container adapter. The c ...
Posted by gotit on Fri, 17 Sep 2021 20:10:18 -0700
stable_sort user defined comparison function stepping pit (shallow understanding)
1. General
"A good memory is better than a bad pen". This article is the first article of "difficult and miscellaneous diseases encountered". This article mainly introduces the STL stable encountered in today's work_ The problem of custom comparison function of sort algorithm is only a superficial introduction. The specific ...
Posted by Lokolo on Wed, 01 Sep 2021 22:26:07 -0700