C + + learning notes
This blog is derived from C + + language learning. Constructors are widely used. Constructors generally need 1. The constructor name is the same as the class name; 2. There is no return value type declaration before the constructor name. 3. Constructor cannot return a value through return. 4. Typically, constructors have a public attribute. The ...
Posted by kovudalion on Sat, 20 Nov 2021 09:50:45 -0800
Data structure - Implementation of stack container
Implementation of stack
Stack is an important data structure. It is a linear structure with the characteristics of last in first out Because there are two implementations of linear table, there are also two implementations of stack, namely sequential storage structure and chain storage structure. This paper gives an implementation based on cha ...
Posted by weazy on Sat, 20 Nov 2021 09:44:26 -0800
3. C++ STL: deque container
3.3 deque container
Disclaimer: This article is a note on learning C++ STL - standard template library, which is convenient for later review; Mainly refer to C++ Prime, C + + standard library Dark horse programmer's ingenuity | C + + tutorial: introduction to programming from 0 to 1 Wait.
3.3.1 basic concept of deque container
Fun ...
Posted by meritre on Fri, 19 Nov 2021 22:10:43 -0800
Linux basic instructions
Command format
command [options] [arguments]
Basic instructions: Directory related instructions, ordinary file instructions, matching search instructions, permission related instructions Instruction usage rules: instruction name [operation option] [operation object]
Instruction Name: the name of a command, indicating the command to be exe ...
Posted by mikie46 on Fri, 19 Nov 2021 21:39:48 -0800
Hash table application (bitmap and bloom filter)
catalogue
1, Bitmap
1.1 bitmap concept
1.2 application of bitmap
1.3 implementation of bitmap
2, Bloom filter
2.1 concept of Bloom filter
&n ...
Posted by dianaqt on Fri, 19 Nov 2021 19:48:13 -0800
Data structure - linear table concept and basic operation
data structure
Basic concept and operation of linear table (I)
Mind map
2.1 definition and basic operation of linear table
2.1.1 definitions
A linear table is a finite sequence of n (n ≥ 0) data elements with the same data type, where n is the table length. When n = 0, the linear table is an empty table. If L is used to name t ...
Posted by Dax on Fri, 19 Nov 2021 14:47:57 -0800
Skillfully solving mathematical problems with C + + algorithm
Skillfully solve mathematical problems
Using C + + to solve classical mathematical problems
1. Common multiples and common factors
Using the rolling division method, we can easily obtain the greatest common divisor (gcd) of two numbers; Multiply the two numbers and divide by the greatest common factor to obtain the least common multiple (LCM ...
Posted by bdee1 on Fri, 19 Nov 2021 11:17:57 -0800
PAT B1058 1073 multiple choice question (the meaning of the question is similar and can be compared)
1058 multiple choice questions (20 points)
Correcting multiple-choice questions is more troublesome. Please write a program to help the teacher correct multiple-choice questions and point out which question is wrong most.
Input format:
Input gives two positive integers N (≤) on the first line 1000) and M (≤ 100), which ar ...
Posted by rdub on Fri, 19 Nov 2021 05:01:30 -0800
STL source code analysis overview
catalogue
Node of list
list is more complex than vector's continuous linear space. Its storage space is discontinuous. The advantage is that each time an element is inserted and deleted, only one element's space needs to be configured or releasedIt is very convenient to insert and delete
Node of list
The list itself and the nodes of ...
Posted by cesar110 on Fri, 19 Nov 2021 03:56:43 -0800
[C language] character function and string function
catalogue
Find string length
1.strlen
String function with unlimited length
2.strcpy
3.strcat
4.strcmp
String function with limited length
5.strncpy,strncat,strncmp
String lookup
6.strstr
String cutting
7.strtok
Error message report
8.strerror
Memory operation function
9.memcpy
10.memmove
11.memcmp
12. memset
other
13. Some ...
Posted by Wayne Herbert on Thu, 18 Nov 2021 22:19:23 -0800