Learning C + + (III. encapsulation and overloading)

1, Encapsulation Encapsulation: it is the hiding and modularization of information. It is a method to separate the interface from the implementation. In the study of computer language, we have encapsulated data and function. Object encapsulation encapsulates the data and its operations into a whole object, so that the program can access or mod ...

Posted by EnDee321 on Wed, 09 Mar 2022 09:36:23 +0100

Search (part of the real problem)

Crop hybridization Title Description Crop hybridization is an important step in crop cultivation. There are ^ crops (numbered ^ 1 ^ to ^ n) known, and the time from sowing to maturity of ^ i ^ crop is ^ Ti. Crops can be hybridized in pairs, and the longer of the two kinds of time is taken as the hybridization time. If the planting time ...

Posted by influx on Wed, 09 Mar 2022 08:53:51 +0100

Embedded linux learning notes -- Notes on the use of open source library spdlog

Recently, I sorted out the code and saw the company's code on log. I gained a lot, so I sorted out the instructions for the use of spdlog library. https://github.com/gabime/spdlog.git This paper mainly arranges the following aspects. The main basis for reference is the official routine, which is located in github example\example.cpp 1. Lo ...

Posted by tofi84 on Tue, 08 Mar 2022 19:37:56 +0100

C + + refresh screen

C + + refresh screen Method 1: clear the text and reprint Use the system function to clear the text of the console, and then print again to achieve the effect of refreshing the screen There is no need to talk more about the system function. Just go to the code: #include <bits/stdc++.h> #include <windows.h> //Sleep() using name ...

Posted by harkonenn on Tue, 08 Mar 2022 18:59:32 +0100

"Fool code template" solves three basic problems

"Fool code template" solves three basic problems    Preface: the focus of this article is the establishment and application of fool code template. In the part of knapsack principle, you may talk less and jump. You can focus on absorbing the knowledge of "code template part" and the application method of cod ...

Posted by Hoangsta on Tue, 08 Mar 2022 12:49:30 +0100

Deep route lab | llvm IR tutorial

Let's review the recent conference of LLVM developers. The whole tutorial is very suitable for people without LLVM foundation to get started and operate a piece of LLVM code.PrerequisiteIR - > intermediate representation is the so-called intermediate representation. Generally speaking, the IR used by the compiler includes DAG, three address ...

Posted by Shibby on Tue, 08 Mar 2022 07:31:37 +0100

5 STL [vector introduction] [create / add / insert / delete] [iterator] [vector member function] [access vector] [free vector memory]

0 - Preface reference resources: http://c.biancheng.net/view/6749.html http://c.biancheng.net/view/6803.html Underlying implementation mechanism of C++ vector (STL vector) (easy to understand) C++ STL vector add elements (push_back() and empty)_ Back () detailed explanation Several ways of deleting elements in C++ STL vector ( ...

Posted by Azad on Tue, 08 Mar 2022 06:03:16 +0100

C + + design pattern sorting 012 - responsibility chain pattern, observer pattern and state pattern

catalogue 18. Responsibility chain model 18.1 example 2 19. Observer mode 19.1 example 2 20. Status mode 18. Responsibility chain model Responsibility chain mode: make multiple objects have the opportunity to process the request, so as to avoid the coupling relationship between the sender and receiver of the request. Connect these objec ...

Posted by BobcatM on Tue, 08 Mar 2022 05:22:09 +0100

Visual Studio 2015 + PCL1.8.1 environment configuration

catalogue 1. Download resource package 2. Install PCL 3. Install openni2 two 4. Environment configuration 5. Configure pcl1 in vs2015 environment eight point one 1.6 testing 1.7 description 1.8 References: 1. Download resource package vs2015 is installed by default vs2015 Community Edition download address: https://my.visualstudi ...

Posted by Bisa on Tue, 08 Mar 2022 04:07:17 +0100

C + + improve programming -- STL common algorithm: common sorting algorithm

3. Common sorting algorithms   learning objective: master common sorting algorithms.   introduction to algorithm: Sort   / / sort the elements in the containerrandom_shuffle    / / shuffle and randomly adjust the order of elements within the specified rangeMerge   / / merge container elements and store them ...

Posted by admin on Mon, 07 Mar 2022 18:24:47 +0100