On C + + object model
Member variables and member functions are stored separately, which means that member functions do not strictly belong to classes. The structure in C language only stores variables. It is necessary to declare and define the implementation function outside the structure. C + + abstracts the idea of class and encapsulates member variables and memb ...
Posted by cauri on Thu, 04 Nov 2021 15:31:43 +0100
Path planning -- Application of dynamic programming in Apollo Planner and C + + code implementation
What is dynamic programming (DP)
Bellman optimal principle
the characteristic of multi-stage decision-making process is that decisions must be made in each stage. The strategy of decision-making process with N stages is a decision sequence composed of n successive stage decisions. Since the termination state of the previous stage ...
Posted by petersro on Thu, 04 Nov 2021 09:50:50 +0100
[C + +] learning notes -- creation and use of set/multiset container and pair group
set/multiset container
Container:
set/multiset
Header file: #include
Basic concepts of set
Introduction:
All elements are automatically sorted (ascending from small to large) upon insertion
Essence:
set/multiset is an associative container, and its underlying structure is implemented by binary tree.
Difference between set and multi ...
Posted by Anim9or on Wed, 03 Nov 2021 11:01:52 +0100
C + + Experiment 2 inheritance and polymorphism
Experimental environment
Operating system: win10 gcc: 8.1.0 Development software: qt5.14.2
Experimental content
1, Inheritance access test Design member functions or variables of class A with different attributes such as public, protected and private; Class B inherits A through public, protected, private and other ways, and tests the mem ...
Posted by jd72 on Wed, 03 Nov 2021 06:04:29 +0100
Detailed explanation of heap sorting
1, What is a pile?
Heap is actually a binary tree implemented by array. It uses the structure of complete binary tree to maintain a set of data. This makes the time complexity of each group of related operations between O(1)~O(logN), which is quite advantageous.
So what is a complete binary tree? Let's look at this group of pictures: I ...
Posted by dakey on Tue, 02 Nov 2021 12:48:23 +0100
C + + Basics (advanced tutorial / STL) -- Based on Java && C Basics
Advanced tutorial
1. Files and streams
data typedescribeofstreamThis data type represents the output file stream, which is used to create a file and write information to the file.ifstreamThis data type represents an input file stream for reading information from a file.fstreamThis data type usually represents a file stream and has both ofstre ...
Posted by dhimok on Tue, 02 Nov 2021 10:27:10 +0100
The difference between overloading, rewriting (overwriting) and hiding in C + +
Basic concepts: Overload: it refers to several functions with the same name declared in the same accessible area with different parameter columns (different types, numbers and orders of parameters). It determines which function to call according to the parameter list. Overload does not care about the return type of the function. Example:
class ...
Posted by baccarak on Mon, 01 Nov 2021 07:44:21 +0100
Mathematical knowledge I
1, Prime number
Prime number, composite number: all for nature greater than 1. Prime number: contains only two divisors of 1 and itself. 1. Judging prime number (Trial Division) O(sqrt(n)) When enumerating, you only need to enumerate to sqrt(n), because if i is a factor of X, then x/i is also a factor of X.
#include<iostream>
using na ...
Posted by animedls on Sun, 31 Oct 2021 16:52:32 +0100
C + + - Introduction to basic knowledge
1. Getting to know C++
1.1 first C + + program
To create a new project, select Create an empty project for C + +: Select project name and location: To add a C + + file to the source file:
# include <iostream>
using namespace std;
int main()
{
// nowrap
cout << "hello world" ;
// Line feed, line feed with < < endl
...
Posted by supermerc on Sun, 31 Oct 2021 04:02:47 +0100
Bit segment and size end
1. Bit segment
During the interview with ZTE, I was asked about the content of the paragraph. I didn't know anything about the paragraph at that time. Let's make a summary today.
Firstly, bit segment is a definition method of structure to save memory. It is widely used in computer networks. The following examples are given.
For example, we now ...
Posted by Lucidnight on Sat, 30 Oct 2021 16:07:51 +0200