Use C/C + + to read and write mat file (Clion)

Use C/C + + to read and write mat file (Clion) Recently, I need to use C + + to process the data generated by matlab. I refer to some online blogs, but they all use VS. I prefer to use Clion. I also encountered some pits in the process of configuration. Please record. 1, Create project and add test code Let's not talk about creating a proje ...

Posted by rpmorrow on Sun, 06 Mar 2022 11:39:17 +0100

Data structure - red black tree

Data structure - red black tree preface Red black tree is the underlying data structure of map, set, mutilmap and mutilset containers. It is also a very important data structure. It further optimizes AVL in efficiency, because AVL structure cannot avoid a large number of rotation operations during insertion or deletion, resulting in loss of e ...

Posted by guitarist809 on Sun, 06 Mar 2022 11:35:12 +0100

[C + +] template (function template) (class template) (generic programming)

Hello, bald men. Let's talk about the template today Key points of this chapter Generic Programming Function templateClass template Generic Programming How do we usually exchange two numbers? Obviously, we'll write a swap function void Swap(int& left, int& right) { int temp = left; left = right; right = temp; } void Swap(d ...

Posted by Pascal P. on Sun, 06 Mar 2022 11:11:35 +0100

C + + template (initial level)

When learning C language, we all wrote a function called swap, which is used to exchange the values of two variables. Like this. void Swap(int& left, int& right){ int temp = left; left = right; right = temp; } void Swap(double& num1, double& num2){ int tmp = num1; num1 = num2; num2 = tmp; } ... We fou ...

Posted by drepster on Sun, 06 Mar 2022 11:06:34 +0100

LeetCode question brushing record

Sword finger Offer 30 Stack containing min function Use the auxiliary value s2 to store the minimum value. If there is one smaller than s2, let the smaller value enter s2. When the minimum value in the original s1 comes out of the stack, judge that if it is equivalent to the s2 value, it means that the minimum value needs to be updated, then t ...

Posted by skroks609 on Sun, 06 Mar 2022 08:32:08 +0100

Qt -- basic class

Foundation type Because Qt is a C + + framework, all syntax and data types in C + + are supported in Qt, but Qt also defines some of its own data types (mostly aliases of C + + data types). Let's introduce these basic data types QT basic data types are defined in #include < qtglobal > Type namenotesremarksqint8signed charSigned 8-bit d ...

Posted by Infinitus 8 on Sun, 06 Mar 2022 07:16:41 +0100

The second week of 2022

A.Binary Tree meaning of the title If the root is (a,b), the left child is (a+b,b) and the right child is (a,a+b). Given (m,n), the initial root is (1,1). From (1,1) to (m,n), you need to walk several times to the left subtree and several times to the right subtree. Problem solving ideas Idea 1: reverse thinking, from (m,n) to (1,1). Given (m, ...

Posted by andymelton on Sun, 06 Mar 2022 07:04:04 +0100

Abstract factory pattern of GoF design pattern and its examples

definition: Product hierarchy structure: product hierarchy structure is the inheritance structure of products. For example, an abstract class is TV, and its subclasses include Haier TV, Hisense TV and TCL TV. Then the abstract TV forms a product hierarchy between TVs without specific brands. The image TV is the parent class, while the TV of sp ...

Posted by grim1208 on Sun, 06 Mar 2022 06:06:15 +0100

Teacher information management system

[this article is the author's final course design assignment, so it is long. The author's programming ability is weak, and many codes need to be improved. For the first time, I hope you can forgive me and forgive me; those who have optimization opinions are welcome to share with you in the comment area! I hope this article can help students in ...

Posted by 303tech on Sun, 06 Mar 2022 01:04:15 +0100

8 minutes to learn the longest common subsequence (with C + + source code, the one that runs directly)

Algorithm is really wonderful. It's easy to be addicted after learning. Of course, it's said on a simple premise. If I encounter that kind of problem, I also have a headache. Today's plot is still the form of dialogue between teachers and students. In this way, I think it is more gradual and less abrupt. What do you think? Now, students, let' ...

Posted by dragon_sa on Sat, 05 Mar 2022 21:52:52 +0100