In ACM algorithm competition / LeetCode using C + + to brush questions and other scenarios, usually:
A lot of C + + source code needs to be maintained
Multiple main function entries are required to facilitate test execution
Some self written public function class libraries (such as debug output vector, etc.) are referenced in multiple files
T ...
Posted by DarkendSoul on Thu, 12 May 2022 18:47:09 +0300
📕 Mutex and deadlock
1, Data sharing issues
First, let's look at the execution order of multithreading:
void TextThread() {
cout << "I am a thread:" << this_thread::get_id() << endl;
//In thread operation code
cout << "thread " << this_thread::get_id() << "End of operation" << endl;
}
int main()
{
...
Posted by rd321 on Thu, 12 May 2022 09:14:46 +0300
Concept:
In the following pointing relationship of A to B and B to C:
First, C is "a piece of content". For example, you allocate a piece of memory with malloc or new, and then insert "a piece of content", that is C. The starting address of C is 0x00000008.
B is a pointer variable in which the address of C is stored, but B a ...
Posted by cturner on Thu, 12 May 2022 04:23:03 +0300
10/14/2020
video camera
Camera represents the player's perspective; How players see the world. Therefore, the camera is only related to human controlled players. The PlayerController specifies the camera class and instantiates the Camera Actor (used to calculate the position and direction from which the player looks at the world).
P ...
Posted by alconebay on Wed, 11 May 2022 15:49:04 +0300
This article aims to record the algorithm problem of finding the inverse logarithm, but it involves another Leetcode algorithm problem of finding the inverse number, so the first part is the LeetCode [315] previously written, and the second part is the problem of finding the inverse pair number. (the second part is actually modified from the fi ...
Posted by nickiehow on Tue, 10 May 2022 23:36:25 +0300
------------Restore content start------------
Reference, inheritance and derivation
Reference Introduction
First of all, we should know that the transfer of parameters is essentially a process of assignment, which is to copy the memory. The so-called memory copy refers to copying data from one memory to another. For aggregate types (complex typ ...
Posted by justinh on Tue, 10 May 2022 08:16:15 +0300
catalogue
1. Assignment compatibility between father and son
2 special functions with the same name
Parent child compatible Assignment 1
Subclass objects can be used as parent objects (compatibility)
Subclass objects can be directly assigned to parent objects
Subclass objects can directly initialize parent objects
The parent class poin ...
Posted by steved on Mon, 09 May 2022 17:11:51 +0300
topic
Please design a function to determine whether there is a path containing all characters of a string in a matrix. The path can start from any cell in the matrix, and each step can move one cell left, right, up, and down in the matrix. If a path passes through a grid in the matrix, the path can no longer enter that grid. For example, the 3 ...
Posted by jwb666 on Mon, 09 May 2022 14:34:39 +0300
preface:
"C language introduction guide", the full text is divided into three parts, with a total of 34248 words. This is a collection version, which is suitable for beginners to get started with C language. Non beginners can also review the relevant knowledge points of C language through this article to strengthen their memory! Thir ...
A. Base station installation
Description
Once upon a time, there was an endless beach. Behind the beach was land and in front of it was a vast sea. There are many small islands in the sea. Now, some base stations (anywhere on the beach) need to be installed on the beach, so that the residents on the island can talk with their mobile phones. T ...
Posted by seularts on Sun, 08 May 2022 10:19:18 +0300