(c + + growth record) - C + + cast operators (static_cast, reinterpret_cast, const_cast and dynamic_cast)
C + + cast operator
appendix
Encyclopedia of professional vocabulary
C languageC++PointerCast type
reference
Statement: some of the contents of this article are directly from references and are subject to infringement and deletion.
C + + cast operators (static_cast, reinterpret_cast, const_cast and dynamic_cast)
summary
In my daily ...
Posted by batfastad on Sat, 19 Feb 2022 01:50:39 +0100
Force buckle -- design cycle queue (problem solution)
This problem needs to implement a circular queue, so before that, we need to know the concept and structure of queue
Queue: a special linear table that can only be inserted at one end and deleted at the other end. It has the characteristics of first in first out, then in and then out Delete one end of the queue Enter the queue: the end of t ...
Posted by trygve on Sat, 19 Feb 2022 01:32:12 +0100
System Verilog - Fundamentals of object-oriented programming
1, Overview of classes
Handle (spatial pointer) Object (storage space)
Transaction t1, t2;//Declare handle t1, t2
t1 = new();//Instantiate the object and assign its handle to t1
t2 = t1;//Assign the value of t1 to t2, that is, t1 and t2 point to the same object
t1 = new();//Instantiate the second object and give its handle to t1
//At thi ...
Posted by Trizen on Fri, 18 Feb 2022 20:03:47 +0100
Use ros1 under ros2_ Bridge and ros1 custom message bridge
Use ros1 under ros2_ Bridge and ros1 custom message bridge
Sample environment Operating system: ubuntu 20.04 amd64 ros version: noetic ros2 version: foxy ros1 sample code
Create workspace catkin for ros1_ WS, function pack custom_msgs and create an MSG file testnoetic msg TestNoetic. The contents of the MSG file are as follows: string te ...
Posted by mrbaseball34 on Fri, 18 Feb 2022 19:01:00 +0100
C + + learning notes
Classes and object orientation (1)
theory
Relationship between class and object: 1. Object oriented is a programming idea 2. Class is a kind of grammar 3. Grammar is the basis of realizing programming ideas
class
Definition: a collection of objects with the same attributes (data members) and behaviors (functions), such as: Human beings are ...
Posted by Backara_Drift on Fri, 18 Feb 2022 12:34:54 +0100
STL container: dual end queue deque and priority queue priority_queue
Double ended queue deque
deque is a double ended queue, which can be inserted at the head and tail, or deleted at the head and tail. Its advantage is that it combines the advantages of vector and list, but realizes random access and header plug deletion. When the space is not enough and needs to be expanded, it does not need to be as compl ...
Posted by chadtimothy23 on Fri, 18 Feb 2022 12:12:55 +0100
Luogu P1896 [SCOI2005] mutual non aggression (shape pressure dp)
Title Description
Title address: P1896 [SCOI2005] mutual non aggression
In N × There are K kings in N's chessboard so that they don't attack each other. How many placement schemes are there. The king can attack one grid in its upper, lower, left, lower, left, lower, right, upper, right and lower eight directions, a total of 8 grids. I ...
Posted by lilRachie on Fri, 18 Feb 2022 08:03:58 +0100
SDNU_2020Shenyang_Qualification problem solution
C Gym - 102822D
analysis: The answer is monotonous and can be divided into two points. Then the focus is on the writing of the judgment function. Let's assume that the answer is X. because this question needs to reduce the bomb by - 1 before it explodes, it's very awkward. Let's first consider the case that the bomb explodes when it reaches 0. ...
Posted by jhuaraya on Fri, 18 Feb 2022 07:42:23 +0100
Icon for repairing VSCode associated files - Python, C++,Java
In recent days, I began to reuse vscode as the default editor (Python, cpp). After setting it as the default to open the software, I found that the icon of the program file in the windows file manager has become the icon of vscode itself, which does not distinguish the file type, which is inconvenient.
Modification effect:
Manually modi ...
Posted by Seol on Fri, 18 Feb 2022 02:40:04 +0100
modern_cpp_5-C++ STL container&iterator
C + + container
Basic Usage
Gets the length of the container
Before, we often used sizeof() to obtain the length of the array:
int data[17];
size_t data_size = sizeof(data)/sizeof(data[0]);
printf("Size of array: %zu",data_size);
However, using the size() method of the container can obtain the data length more conveniently:
std::arr ...
Posted by Rippie on Thu, 17 Feb 2022 15:20:52 +0100