Initialization form of initial value in C + + class
C++11 specifies that an in class initial value can be provided for data members. When an object is created, the initial value in the class is used to initialize the data member. As shown below, the initial values in the class of cursor and height are both 0.
class Screen
{
private:
int cursor = 0;
int height = 0;
};
I The reason why in ...
Posted by penguinboy on Sat, 22 Jan 2022 07:55:09 +0100
[C + +] [problem solution] performance ranking
subject
Title Description
The new year is coming!
As a CEO with n employees, it's time for you to rank the employees' performance annually.
Through the indicators of n employees this year (skill p, communication r, cooperation s, project t), Calculate the annual performance of each employee, and output everyone's name from high to low.
Per ...
Posted by phpnewbiy on Sat, 22 Jan 2022 07:50:35 +0100
modern_cpp_3-C++ Basic Syntax
Slides of structure 2:
Modern C++ for Computer Vision Lecture 2: C++ Basic Syntax (uni-bonn.de)
This part mainly introduces the keywords, entities, entity declarations and definitions, types, variables, naming rules of identifiers, expressions, if else structures, switch structures, while loops, for loops, arithmetic expressions, condition ...
Posted by aswini_1978 on Sat, 22 Jan 2022 06:45:58 +0100
New feature of C++17 -- std::optional
catalogue
1, Foreword
2, Use of optional
3, Solve the problems in the preface
1, Foreword
We may often encounter this situation in the process of writing code:
A function obtains a return value after a series of calculations, but the function may have abnormal branches during execution. The value to be calculated has not been obtained wh ...
Posted by danielson2k on Sat, 22 Jan 2022 06:42:07 +0100
C + + message bus Mozart: optional
optional principle
Mozart's optional is also a container, which is responsible for managing an optional holding value. This holding value can exist or not exist. File git address: https://github.com/libmozart/foundation/blob/master/mozart%2B%2B/mpp_foundation/optional.hpp
Implementation principle: in addition to containing the value, the data ...
Posted by Deadmeat on Sat, 22 Jan 2022 06:05:04 +0100
Basic knowledge of C + + (10000 words summary)
Article catalogue
catalogue
Article catalogue
preface
1. Input and output of C + +
1.1.C + + header file
1.2.C + + I / O
2. Default parameters
2.1 definition of default parameters
2.2 classification of default parameters
**All default parameters
**Semi default parameter
2.3 precautions for default functions
3. Function overloading ...
Posted by LordTyphon on Sat, 22 Jan 2022 05:37:32 +0100
[personal notes] OpenCV4 C + + quick start 07 lesson
Personal data, for learning purposes only Modification time - 17:40:15, January 21, 2022 Course of study: OpenCV4 C + + quick start video 30 lectures Video Teacher: Jia Zhigang
07 scroll bar operation demonstration - parameter transfer adjustment
opencv knowledge points:
Parameter passing - createTrackbarConcept - brightness and contrastCl ...
Posted by Shiny_Charizard on Sat, 22 Jan 2022 04:06:50 +0100
Pointer array and array pointer - not twins of twins
catalogue
1, Pointer array
1.1 basic knowledge of pointer array
1.2 practical case analysis of pointer array
Second, array pointer
1.1 basic knowledge of array pointer
2.2 application examples of array pointers
2.2.1 negative examples
2.2.2 correct examples
As the title shows, today we will know a pair of twins, but not twins.
1, Poi ...
Posted by jovankau on Sat, 22 Jan 2022 00:21:45 +0100
Internal memory pool (ngx_pool_t) technology for nginx source code analysis
Article Directory
Preface
1. Basic concepts of memory pools
2. nginx data type monitoring
3. Definition of nginx memory pool related structures
1. Memory pool data management structure
2. Memory pool data structure
3. Large Memory Block Data Structure
4. Memory Release Processing Structure
4. Operation of memory pool
1. ...
Posted by zzlong on Fri, 21 Jan 2022 21:21:42 +0100
[C + + Notes] IV. complex data types
catalogue
18. Pointer Foundation
18.1} what is stored in the variable
18.2 how to use variables in programs
19. Pointer movement and data type
20. Pointer initialization
21. Use the new keyword to allocate memory space
22. Use delete to free memory space
23. Dynamically create and release arrays
24. Use dynamically created arrays
25. ...
Posted by ctiberg on Fri, 21 Jan 2022 19:59:04 +0100