stl source code learning (version 2.91)--list

stl source code learning (version 2.91)--list First, read the list() constructor 1. The function of the default constructor and the time to be called struct no{ no(int i){} //no(){ // std::cout << "s" << std::endl; //} long data; }; struct A{ no n; }; int main(){ A a; } This code reports a n error, indicating that c ...

Posted by aktell on Mon, 04 Nov 2019 16:43:05 -0800

Analysis of memory leak

I. problem description When the memory of a process is abnormally large, there may be a memory leak, or there may be no limit on the length of data structures such as related queues in memory. II. Solutions If the problem is easy to appear, it is better to use umdh tool to make judgment. The usage of this tool is detailed in its help manual, an ...

Posted by jp2php on Fri, 01 Nov 2019 00:30:49 -0700

Precautions in online OJ

When using OJ online for the first time, the topic is as follows: Enter a string to find the set of characters it containsEnter a description:Enter a string for each group of data. The maximum length of the string is 100, and it only contains letters. It cannot be an empty string. It is case sensitive.Output Description:One line for each grou ...

Posted by awais_ciit on Wed, 30 Oct 2019 21:06:37 -0700

C + + split string function

In C++ STL, there is no thread function to split the string, but the function is very common. Therefore, this paper introduces several string segmentation methods. Using the strtok function in C The strtok function in C can split C-style strings. Strtok_ris the thread safe version of strtok. Reference resources https://linux.die.net/man/3/strto ...

Posted by seidel on Wed, 30 Oct 2019 07:14:01 -0700

QCustomplot drawing chart with sharing - multi function cursor

Catalog I. overview II. Renderings III. source code explanation 1. Source code structure 2. Header file 3. Add cursor 4. Monitoring movement 5. Move cursor 6. Other functions IV. test method 1. Test project 2. Test documents 3. Test co ...

Posted by burningkamikaze on Sat, 26 Oct 2019 13:07:47 -0700

c + + copy constructors (focus on shallow and deep copies with pointers)

Today, my colleague asked a question about the copy constructor. The class contains pointers. Let's talk about the copy constructor of c + +. The copy constructor of c + + is a kind of constructor, which is the initialization of class objects. Only one parameter of the copy constructor is the reference of this class. Note that the default con ...

Posted by AbraCadaver on Wed, 23 Oct 2019 03:41:00 -0700

Data structure -- basic implementation and explanation of stack (C + + description)

Definition of stack Stack, also known as stack, is a linear table with limited operation. A linear table that is restricted to insert and delete operations only at the end of the table. This end is called the top of the stack, and the other end is called the bottom of the stack. Inserting new elements into a stack is also called pushing, pushi ...

Posted by tfburges on Tue, 22 Oct 2019 13:35:11 -0700

c++ pipe for parent-child process communication

1. pipe programming process of parent-child process communication -Create pipe -Set the output of the process to the pipeline -Create process -Close pipeline write handle -Read the pipeline read handle, read the data into a buffer 2. Precautions -When reading the pipeline data, be sure to close the write handle; -When a parent-child pro ...

Posted by GoNz0 on Sat, 19 Oct 2019 07:30:30 -0700

java calling C + + code in windows and linux environment JNI Technology

Recently, the department needs to call C + + code for Android mobile development, which is very difficult. The final task is given to me to find relevant information. No one tutorial can explain how to call in different environments (windows,linux). I stepped on several holes in the implementation process. In this summary, I hope to see less de ...

Posted by Revlet on Thu, 17 Oct 2019 02:43:21 -0700

C + + generating and parsing XML files

1.xml refers to Extensible Markup Language 2.xml is a markup language, similar to html 3.xml is designed to transfer data, not display data 4.xml tags are not predefined. Label needs to be defined by yourself The difference between XML and HTML 1.xml is not an alternative to html. 2.xml and html are designed for different purposes: 3.xml is des ...

Posted by expostfacto on Wed, 16 Oct 2019 16:05:44 -0700