C + + delves into function pointers

Basic knowledge of function pointer The address of a function is the starting address of the memory where its machine language code is stored. How to use function pointers: Get the address of the functionDeclare a function pointerUse function pointers to call functions Get function address Get the function address, just use the functi ...

Added by gerbs987 on Sat, 12 Feb 2022 17:22:03 +0200

Single source shortest path exercise

Mapping method of single source shortest path Heat Wave Title Link: Heat Wave Analysis: for a relatively naked problem, directly build a drawing and set a template, and I will directly use spfa water. Code implementation: #include<iostream> #include<queue> #include<cstring> using namespace std; const int N=2510,M=12410; ...

Added by reag27 on Sat, 12 Feb 2022 14:16:52 +0200

GDUT ACM2022 winter vacation training topic II D E (01 backpack)

For a better reading experience, please go to: Paxton's little broken station 1, 01 Backpack 01 backpack is to take out several items from M items and put them in a backpack with space W. the volume of each item is W1, W2 to Wn, and the corresponding value is P1,P2 to Pn. 01 knapsack is the simplest problem in knapsack problem. 01 the ...

Added by Bijan on Sat, 12 Feb 2022 09:00:17 +0200

Development and application of fcitx function plug-in

Add plug-ins to Fcitx framework Fcitx plug-ins can be divided into four categories: 1.Frontend 2.Input Method 3.Module 4.User Interface Frontend plug-in is responsible for interface key messages and passing them to Fcitx framework, InputMethod plug-in is responsible for converting keyboard input into their language information, which is ...

Added by jwhite68 on Sat, 12 Feb 2022 08:41:06 +0200

Function and program structure of the strongest move

1. Write in front Previously, we learned to process data and manage simple processes, but the program can't have only one method. In this way, the program is more chaotic, so we need to split and combine the structure of the program accordingly, so it's easier to maintain. 2. Basic knowledge of function Let's write a program that contains a ...

Added by AutomatikStudio on Sat, 12 Feb 2022 06:47:30 +0200

[C + +] analysis of polymorphic common exercises to see if you can't

1, Summary Static polymorphism: function overloading, calling the same function and passing different parameters will have different behaviors Dynamic polymorphism: when calling virtual functions, different objects will have different behaviors / forms Conditions for polymorphism: a. Override the virtual function of the parent class ...

Added by fat creative on Sat, 12 Feb 2022 06:33:53 +0200

Using C + + to realize linked stack (with linked list as the underlying data structure)

1. What is a chain stack? Since the allocation of each element in the stack in memory is not continuous, the connection between elements is realized through a pointer in each element node. As shown below: It can be seen that the head of the linked list is used as the top of the stack. 2. Comparison between sequential stack and chain stac ...

Added by social_experiment on Sat, 12 Feb 2022 05:52:15 +0200

2021 SDNU-ACM training team final competition (supplementary question)

OK, I'm here again. I have to write the supplementary questions for a long time every time. The teacher's questions are very good. I'm too delicious to make up the questions carefully~ The code should always be AC code written by myself. I'm not used to the beautiful code of teachers and brothers. I can't understand it,,, A Alice and Bob o ...

Added by winkhere on Sat, 12 Feb 2022 04:29:30 +0200

Circuit maintenance double ended queue wide search

Double ended queue wide search is a kind of Dijkstra algorithm, which mainly solves the shortest path problem in which the weight of the edge in the graph is only 0 or 1. Operation: Every time you take out elements from the team head and expand other elements 1. If the edge weight of an extended element is 0, the element is inserted into ...

Added by amwd07 on Sat, 12 Feb 2022 04:04:35 +0200

Logue P2580 so he started the wrong roll call

Topic background The coach of XS middle school chemistry competition team is a person who loves hearthstone. He would roll the roll while rubbing the stove stone, so that one day he called a classmate twice in a row, and then he was just found by the passing headmaster, and then there was an EULA EULA (for details, see the concluded game CON9 ...

Added by DrTrans on Sat, 12 Feb 2022 03:57:01 +0200