Clauses 23 and 24
Clause 23: replace member function with non member and non friend Why replace member functions with non member functions and non friend functions? In fact, this is to ensure the encapsulation of data. How does the encapsulation of data reflect? A rough measurement. We think that the more functions can access it, the lower the encapsulation of d ...
Posted by lettie_dude on Tue, 04 Jan 2022 20:21:38 +0100
win 32 learning note message queue
Grab message: GetMessage: get the message from the system, remove the message from the system, and block the function. When the system has no message, it will wait for the next message. PeekMessage: get messages from the system by viewing. Messages can not be removed from the system. It is a non blocking function. When there is no message in th ...
Posted by AdamSnow on Tue, 04 Jan 2022 19:31:32 +0100
The strongest C language tutorial in history -- pointer (Preliminary)
catalogue
1. What is the pointer?
2. Pointer and pointer type
2.1 pointer + - integer
2.2 dereference of pointer
3. Field pointer
3.1 cause of formation
3.2 how to avoid wild pointer
4. Pointer operation
4.1 pointer + - integer
4.2 pointer - pointer
4.3 pointer relation operation
5. Pointers and arrays
6. Secondary pointer ...
Posted by jsim on Tue, 04 Jan 2022 17:24:44 +0100
C + + learning notes - structures and classes
Structures and classes
definition
Place multiple objects together as a whole
//definition
struct str
{
int x;
double y;
};
//statement
struct str;
//Only the declaration only knows that str is a struct, but it is not known internally. At this time, str is incomplete type
//However, str* mystr can be defined; The pointer size of all ...
Posted by lailaigogo on Tue, 04 Jan 2022 16:35:08 +0100
Binary tree and path for a certain value - byte jump written test programming C/C++
Title Description
Enter the root node root and an integer expectNumber of a binary tree to find all paths where the sum of node values in the binary tree is expectNumber.
1. The problem path is defined as the node from the root node of the tree to the leaf node
(cat bin roars and prompts: pay great attention here - you must go to the leaf no ...
Posted by ziltech on Tue, 04 Jan 2022 15:25:56 +0100
Data structure course design -- ticket sales system (C + +)
introduction
The data structure course design at the end of this semester requires us to complete a simple small program. I chose a ticket sales system to realize some basic functions; Because the time is short and I make up lessons in the review week, there is nothing outstanding. I'll talk about my code implementation and what can be further ...
Posted by motofzr1000 on Tue, 04 Jan 2022 15:17:53 +0100
Deep search (DFS) questions
catalogue
1, Foreword
2, Title Description
① Students who want to practice English can read this question carefully to see if they can understand the question. What do you want us to do!
② The following is the input and output of the sample (read the question carefully! There is an implication)
3, Topic interpretation
4, Train of thoug ...
Posted by jateeq on Tue, 04 Jan 2022 14:00:50 +0100
leetcode brush questions / daily questions 116 Populates the next right node pointer for each node
116. Populate the next right node pointer for each node
Meaning:
Given a perfect binary tree, all leaf nodes are in the same layer, and each parent node has two child nodes. Binary tree is defined as follows:
struct Node {
int val;
Node *left;
Node *right;
Node *next;
}
Fill in each of its next pointers so that this pointer po ...
Posted by moonie on Tue, 04 Jan 2022 10:31:10 +0100
c + + common STL summary (balanced binary tree multiset)
The complexity of adding, deleting and searching data structures is limited to log(n), which is embodied in four sorting containers: multiset and Multimap in STL Multiset header file: Multimap header file:
This paper deals with several container traversal methods of multiset and Multimap: only with the help of iterators multiset::iterator p; p ...
Posted by Gasolene on Tue, 04 Jan 2022 08:18:27 +0100
Write a network disk yourself?
Author: osmanthus New Year cake, no reprint without permission!
Continuous updating
preface
The project is written in C and C + +. It involves many knowledge points and has not been written yet. It is a good project to expand our horizons! In the future, relevant teaching videos will be placed at the end of the article. Please pay att ...
Posted by kellog on Tue, 04 Jan 2022 08:00:04 +0100