Reprint [to] C + + assignment constructor (assignment operator overload)
Note: the content of the article is not strictly verified. Please leave a message if you have any questions or errors.
When an object of a class assigns a value to another object of the class, the assignment constructor of the class will be used. When the assignment con ...
Posted by fuzzy1 on Sun, 27 Feb 2022 09:38:25 +0100
1. External template
1) Problems of traditional C + +
In traditional C + +, templates are instantiated by the compiler only when used. In other words, as long as the fully defined template is encountered in the code compiled in each compilation unit (file), it will be instantiated. This results in an increase in compi ...
Posted by slick101 on Wed, 19 Jan 2022 06:59:05 +0100
1. Right value reference
C + + introduces R-value reference and mobile semantics, which can avoid unnecessary replication and improve program performance.
(1) Left and right values
All in C + + must belong to one of left value and right value.
Lvalue: refers to the persistent object that still exists after the end of the expression. Rig ...
Posted by Stalingrad on Sat, 15 Jan 2022 13:50:53 +0100
Chapter 19 (special tools and technologies)
/1. Control memory allocation
1). Standard memory management mechanisms cannot be applied directly.
Some applications need to customize the details of memory allocation, such as using the keyword new to place objects in a specific memory space.In order to achieve this goal, we need to overload the ...
Posted by wayz1229 on Tue, 04 Jan 2022 06:46:57 +0100
During this time, I read the basic content of C + + concurrent programming practice and wanted to use the recently learned knowledge to realize a simple thread pool by myself.
Personal understanding of thread pool is to use a fixed number of threads that have been created to perform the specified tasks, so as to avoid th ...
Posted by lauriedunsire on Mon, 27 Dec 2021 14:47:10 +0100
Catalogue of series articles
Zltool kit source code learning notes (1) VS2019 source code compilation
Log function analysis of the tool module of zltool kit source code learning notes (2)
"Zltool kit source code learning notes" (3) terminal command analysis of tool module
Message broadcaster of tool module of zltool kit source cod ...
Posted by PHPFreaksMaster on Sat, 25 Dec 2021 23:58:00 +0100
1, Complex data structure in c + +
Since c, c + + has also developed. Complex data structures are generally not supported in standard libraries. For example, multi-dimensional arrays, multi key KV, not to mention a complex batch of trees. In fact, it is well understood that as a low-level support language, c/c + + pursues high efficiency and m ...
Posted by DarrenL on Wed, 08 Dec 2021 08:39:56 +0100