Day 11 C + + exception handling

1, Basic exception handling Exception handling mechanism: suspend the problem handling, not in the current function, but in other callers (for example, function 1 calls function 2, and function 2 also calls function 3. If an exception is throw n in function n, we can handle it in any of the previous functions.) What is an exception? Anything ...

Posted by rami103 on Sat, 29 Jan 2022 23:53:26 +0100

Use QT to simply make the placement of Chinese chess pieces

1 Introduction    to make chess, chess pieces are essential, but after looking for them online for a long time, it's hard to find satisfactory and supporting chess pieces, and some need VIP download. So I adjust the size through QT's label writing function, then draw a circle outside the label using qpaintevent, and finally run the s ...

Posted by tmswenson on Sat, 29 Jan 2022 22:35:23 +0100

C + + multi thread online learning (13-07)

1. Overview of design mode [concept] some writing methods of code: flexible program and convenient maintenance; But the code is obscure and not easy for others to take over. 2. Single case design mode [concept]: there is one or some special class in the whole project. Only one object belonging to this class can be created. 3. Shared dat ...

Posted by zamzon on Sat, 29 Jan 2022 21:07:04 +0100

Virtual functions in C + +

A virtual function is a member function declared in a base class and redefined (overridden) by a derived class. When you reference a derived class object using a pointer or a reference to a base class, you can call a virtual function for the object and execute the function version of the derived class. Virtual functions ensure that the correct ...

Posted by seanstuart on Sat, 29 Jan 2022 20:00:34 +0100

7 questions to solve the binary search problem

The sequential array searches for a value The basic idea of binary search is that the search interval must be orderly In this paper, all search is based on the closed interval. At this time, the condition in while should be written as l < = R If you search by the open interval (r=nums.size()), the condition in while should be written ...

Posted by erax on Sat, 29 Jan 2022 17:59:15 +0100

Interval maintenance (tree array)

Problem Description: Title Description Problem solving ideas: The basic knowledge of tree array will not be repeated here. We only need to know that it can deal with interval maintainability and modifiable RMQ problems, which is more efficient. The following is the operation of segment tree Single point modification void update(int x,in ...

Posted by franknu on Sat, 29 Jan 2022 15:26:36 +0100

On virtual function inheritance thunk technology of "charm of modern C + + design"

Introduction: when debugging this C + + multi inheritance program with LLDB debugger at work, it is found that the pointer address obtained through LLDB print (alias of expression command) command is different from the address of C + + memory model actually understood. So what is the reason?Author Yang FuSource: Ali technical official accountI. ...

Posted by bPHP on Sat, 29 Jan 2022 14:49:08 +0100

Item 2: Understand auto type deduction.

This is for Effective Modern C++ Study notes for Item2. This time, you can learn the automatic derivation of auto type. Except for one scenario, the template type derivation method learned in Item1 can be tried. Review the type derivation of the template: template<typename T> void f(ParamType param); f(expr); // call f with some ex ...

Posted by jamesmage on Sat, 29 Jan 2022 13:59:40 +0100

2022 Niuke winter vacation algorithm basic training camp

Title Link preface I cooked a chicken and wrote that I went to eat halfway (I can't write the questions after I don't eat...), and I will make up the questions later Attached Official explanation A zhinai's Hello XXXX Problem solution Nothing to say, direct output code print("hello ") B zhinai buys melons Problem solution / idea ...

Posted by lobo235 on Sat, 29 Jan 2022 13:04:47 +0100

Chongqing No.8 Middle School Hongfan junior middle school first grade programming society C2024HF700 winter vacation training summary - Day1

catalogue Day 1 9:00 - 11:00 am, bottom test T1: bouncing grasshopper Title Description Input format Output format sample input Output sample Example explanation analysis T2: Captain Flint's drifting Title Description Input format Output format Sample sample input Resolution: T3. Tennis match Title Description Input format ...

Posted by Theramore on Sat, 29 Jan 2022 11:40:56 +0100