C + + learning notes

catalogue I Differences between C + + and C language structure 1.struct keyword 2. Functions are allowed in C + + structures II Dynamic memory application of C language and C + + 1. malloc, calloc, realloc of C language. 2. Dynamic memory application of C + + (1) Memory request for a single variable (2) Dynamic memory request for array ...

Added by keakathleen on Sun, 20 Feb 2022 17:47:34 +0200

Detailed explanation of C + + multithreading transmission

catalogue 1. Process of thread parameter transfer 1.1 arguments of built-in types 1.1.1 parameter transfer by value 1.1.2 if you want to pass by reference, you need to call std::ref 1.2 class type arguments 1.2.1 passing is an lvalue object 1.2.2 passing is a temporary object (i.e. right value object) 1.2.3 parameters passed need implic ...

Added by Ironphp on Sun, 20 Feb 2022 13:49:17 +0200

UDP protocol realizes simple communication C++

1. IP address Computers in the network use IP addresses for unique identification. There are two types of IP addresses: IPv4 and IPv6. It is generally expressed in decimal system, such as ipv6.168.1, but not in decimal system. How to view IP address related information: Under Windows system, open cmd, enter the command ipconfig, and press en ...

Added by cooldude832 on Sun, 20 Feb 2022 13:11:56 +0200

[C + + Object Oriented Advanced Programming] knowledge summary

Some small knowledge points About C and C++ In C language, data and method (function) are separated, and data is used to create variables. In C + + classes (struct, class), data and functions can be put together (member data, member function), which together produce objects. Classes can also be regarded as two categories: those with point ...

Added by phui_99 on Sun, 20 Feb 2022 12:51:02 +0200

PAT (Basic Level) Practice C + + problem solving process (grumpy version)

Grumpy Xiaoding began to prepare to brush PAT. Although I am a vegetable chicken and feel black at the touch of the whole, anyone with courage is great. At the beginning of the record, this is a brush question website of Zhejiang University. Interested babies can work with me! Link: https://pintia.cn/problem-sets/994805260223102976/problems/typ ...

Added by cillosis on Sun, 20 Feb 2022 12:10:36 +0200

C + + learning notes -- classes and objects (medium)

catalogue 1. Six default member functions of the class 2. Constructor 2.1 concept 2.2 characteristics 3. Destructor 3.1 concept 3.2 characteristics 4. Copy constructor 4.1 concept 4.2 characteristics 5. Overload of assignment operator 5.1 operator overloading 5.1 overload of assignment operator 6. const members 6.1 member functio ...

Added by s2day on Sun, 20 Feb 2022 12:01:59 +0200

Memory management in C + + Basics

C/C + + memory distribution Program memory in C/C + + can be divided into kernel space, stack, memory mapping segment, heap, data segment and code segment. Among them, we mainly need to understand: regionfunctionMemory release formStackStore non static local variables, function parameters and return valuesautomaticheapProgram dynamic memo ...

Added by hypertech on Sun, 20 Feb 2022 09:13:01 +0200

Basic data structure: linked list, monotone stack, monotone queue

1, Linked list and adjacency list 1 linked list    here, we do not use the commonly used structure plus pointer to realize the linked list, because in this way, each node should be new. The number of linked list nodes in common written test questions is 1e5~1e6 level, and new alone is enough to timeout.   so we use arrays ...

Added by ddragas on Sun, 20 Feb 2022 09:08:23 +0200

C + + learning notes

catalogue I C + + header file and namespace 1. Naming method of header file and source file 2. Inclusion method (1) When including self defined header files (2) When a standard library is included 3. Introduction of namespace (1) Create namespace (2) Role of namespace (3) Namespace access II Basic output input 1. Output 2. Input 3. ...

Added by LordTyphon on Sun, 20 Feb 2022 06:58:35 +0200

Detailed explanation of coordinate tracking of tf2 practical operation in ROS (example + code)

catalogue The file structure in the project is as follows: 1. Start the turnle1 node and the keyboard operation node of turnle1, subscribe to the pose information of turnle1, and publish the coordinate information of turnle1 (getturnle1pose. CPP): 2. Start the turtle 2 node, subscribe to the pose information of the turtle 2, and publish the ...

Added by realtek on Sun, 20 Feb 2022 06:46:46 +0200