C++ Primer record_ Chapter VI
Chapter 6 function
A function is a named block of code that we call to execute and the corresponding code.A function can have 0 or more parameters and (usually) produce a result.You can overload functions. The same name corresponds to several different functions.
6.1 function basis
A typical function definition includes the following par ...
Posted by shopphp on Mon, 07 Mar 2022 16:42:28 +0100
C++STL knowledge set
STL
Hey, c + + long time no see, meet you again familiar and strange. The feeling of practicing many brush questions fades a little, and you need to be familiar with the actual questions again. This article will be continuously updated Today, let's remedy the concept of STL in time to facilitate more efficient problem brushing in the future.
...
Posted by vombomin on Mon, 07 Mar 2022 15:09:08 +0100
c++ day13 polymorphism, calculator class case (new creation object)
1. Basic concepts
Polymorphisms fall into two categories
Static polymorphism: function overloading and operator overloading belong to static polymorphism and reuse functionsDynamic polymorphism: derived classes and virtual functions implement runtime polymorphism
Difference between static polymorphism and dynamic polymorphism
Statically poly ...
Posted by sivarts on Mon, 07 Mar 2022 14:28:28 +0100
Does C + + reference occupy memory space?
Through the disassembly code, see if you can see the address of a reference variable to know whether it occupies memory space. Test code:
int main(){
int num = 6;
int &r = num;
int *p = #
int x = r;
int y = *p;
return 0;
}
1. X86-64 platform
Obtain the disassembly code of the main function through GDB or ...
Posted by opencombatclan on Mon, 07 Mar 2022 11:28:13 +0100
Pruning strategy of deep search
Feasible pruning
Cut down unnecessary subtrees on the search tree through some judgment. Sometimes, we will find that the subtree state corresponding to a node is not the result we want, so we don't need to search this branch. Cutting off this subtree is pruning.
Once the final solution of some states can not be found in any case, it can ...
Posted by Phasma Felis on Mon, 07 Mar 2022 10:52:25 +0100
Process protection under r0
preface
The full name of SSDT is System Services Descriptor Table. This table is a link between the Win32 API of Ring3 and the kernel API of Ring0. SSDT not only contains a huge address index table, but also contains some other useful information, such as the base address of the address index, the number of service functions and so on. By modi ...
Posted by ThermalSloth on Mon, 07 Mar 2022 09:45:51 +0100
open62541 client batch monitoring
Add monitoring variable
Interface: UA_Client_MonitoredItems_createDataChangesuse: Add two UAS to the server_ Uint32 type variable node, the Answer and myself
#include "open62541.h"
UA_Boolean running = true;
UA_NodeId addTheAnswerVariable(UA_Server *server)
{
/* Define the attribute of the myInteger variable node */
UA_VariableAttributes ...
Posted by slyte33 on Mon, 07 Mar 2022 07:31:19 +0100
Audio and video development journey (65) - learning and practicing CMake with problems
catalogue
Create an executable program using CMakeCreate a dynamic / static library and use it as a libraryThe third-party library is introduced in the form of source code and used in the form of multi-layer directoryThe third lib library is shared across platforms to change the hierarchical structure of the codeOther small details (problems e ...
Posted by nediaz on Sun, 06 Mar 2022 17:08:20 +0100
Simple implementation of vector in C + +
vector
Vectors are sequence containers that represent arrays that can be resized.
Like arrays, vectors use contiguous storage locations for their elements, which means that their elements can also be accessed using offsets on regular pointers to their elements and are as efficient as arrays. But unlike arrays, their size can change dynamically, ...
Posted by neville on Sun, 06 Mar 2022 16:00:57 +0100
2022-03-06 swipe questions and punch in every day
2022-03-06 swipe questions and punch in every day
Source code - div2 daily question
Path count - topic - Daimayuan Online Judge
There is an n × N grid, some grids are passable, and some grids are obstacles.
At the beginning of your position in the upper left corner, you can go down or right every step and ask how many options there ar ...
Posted by mshen on Sun, 06 Mar 2022 13:37:26 +0100