[C + +] learning notes [12]

polymorphic Basic concepts of polymorphism Polymorphism is one of the three characteristics of C + + object-oriented Polymorphisms fall into two categories Static polymorphism: function overloading and operator overloading belong to static polymorphism and reuse function namesDynamic polymorphism: derived classes and virtual functions i ...

Added by TwistedLogix on Thu, 30 Dec 2021 19:04:13 +0200

Qt Model/View learning - QTableView (elegant) tutorial (with source code)

0. Preface Last article This paper introduces how to derive its own Model class from QAbstractItemModel to realize the data display and editing functions on QTableView. There are some operations related to QTableView. There is no detailed description. This article will talk about the use of QTableView while the iron is hot. The title of ...

Added by suavebum on Thu, 30 Dec 2021 17:45:58 +0200

[C + + open source library] easy to use serial communication API library under Windows and linux

previously on I wrote two blogs about serial port before Virtual serial port simulator and serial port debugging assistant tutorialThe C language program periodically receives the data sent by the virtual serial port The first part mainly introduces the use methods and software recommendations of virtual serial port simulator and serial por ...

Added by cap2cap10 on Thu, 30 Dec 2021 13:39:34 +0200

Why do you perform deep replication when expanding std::vector?

Introduction We know that the reason why std::vector can be dynamically expanded while maintaining sequential storage mainly depends on its capacity expansion and replication mechanism. When the capacity is full, it will subdivide a larger memory area, and then copy all the elements. However, the author found a strange phenomenon. During the e ...

Added by Mchl on Thu, 30 Dec 2021 09:23:00 +0200

Learning notes use of main function with command line parameters (header song)

Task description Please write a program: the executable file generated after the program is built (assuming the file name is mycal.exe) put it in the root directory of Disk c, at the command prompt, go to c: \ and type mycal 100 + 200 to run 300.00; type mycal 100*200 to run 20000.00, etc. the operators in the program are consistent with th ...

Added by k.soule on Thu, 30 Dec 2021 08:56:58 +0200

Chapter 8 - shortest path

Shortest path problem For the algorithm operation of related concepts, see This article. Only the codes of Dijkstra algorithm and Floyd algorithm are introduced here. Dijkstra algorithm BFS can find the shortest path length from a point to another point. Dijkstra algorithm is mainly to find the shortest path length from a point to all oth ...

Added by mad_hacker on Thu, 30 Dec 2021 03:28:55 +0200

[C + + elementary learning] use and Simulation of C++vector

Zero. Preface This chapter will learn the vector class in C + +, master its use and simulation implementation 1, What is a vector Introduction: Vector is a sequence container representing variable size arrays. It also uses continuous storage space to store elements (very similar to string, string stores characters, and vector ...

Added by MattG on Thu, 30 Dec 2021 02:28:04 +0200

Basic operations of queue (sequential queue, cyclic queue)

This paper uses a topic to illustrate two application modes of queue. Title: Suppose that at the weekend ball, men and women enter the ballroom and line up. At the beginning of the dance, one person from the head of the men's team and the head of the women's team will be matched into a dance partner. If the initial number of the two teams i ...

Added by auamy on Thu, 30 Dec 2021 02:01:23 +0200

[VS2013] build OpenGL and C + + console program environment and form drawing

OpenGL learning reference website learnopengl.cn download GLFW . Establish the GLFW environment and ensure that it properly creates the OpenGL context and displays the window. GLFW already has a precompiled binary version and corresponding header file for Visual Studio 2013/2015... / 2019, but for completeness, we will start from compiling t ...

Added by yaba on Wed, 29 Dec 2021 22:15:36 +0200

Ros-3dslamlvi Sam source code reading 13 -- visual_loop reading 6 - callback function + process analysis

2021SC@SDUSC (15) LVI Sam source code reading 13 -- visual_loop reading 6 - callback function + process analysis This time, we will mainly analyze loop_ detection_ Four callback functions in the node file and a function executed in parallel visual_loop Subscribe to the topic in the main function and start a new thread ros::Subscriber sub_i ...

Added by Danny620 on Wed, 29 Dec 2021 20:50:13 +0200