Try to understand virtual functions thoroughly! (test platform: vs2018+win10)
First, link to several blog addresses: Analysis of C + + virtual function table
cout << "Virtual function table address:" << (int*)(&b) << endl;
cout << "Virtual function table - first function address:" << (int*)*(int*)(&b) << endl;
In this blog, cout < < virtual function table add ...
Added by ac1982 on Sat, 25 Dec 2021 19:35:10 +0200
2021.12. 19 on the preliminary order of c language pointer
catalogue
What is the pointer
Pointer type
The types of pointers are as follows:
Meaning of pointer type:
Field pointer
Pointer operation
Pointers and arrays
Secondary pointer
What is the pointer
definition:
Pointer is an important concept and characteristic in C language, and it is also a difficult part to master C language. ...
Added by naveendk.55 on Thu, 23 Dec 2021 20:43:59 +0200
Detailed explanation of red and black trees in HashMap
HashMap in Java uses the linked list method to solve hash conflicts. The HashMap principle is that key value pairs with the same bucket subscript are stored in a linked list. When the linked list becomes longer, searching and adding (you need to determine whether the key already exists) need to traverse the linked list, and the speed will becom ...
Added by *mt on Thu, 23 Dec 2021 03:21:57 +0200
Hand torn advanced C language --- pointer (full of dry goods! Worth collecting!!)
We have already touched the topic of pointer in the chapter of pointer at the primary stage. We know the concept of pointer:
A pointer is a variable used to store an address, which uniquely identifies a piece of memory space.The size of the pointer is fixed at 4 / 8 bytes (32-bit platform / 64 bit platform).Pointers are typed. The pointer typ ...
Added by melissal on Thu, 16 Dec 2021 16:56:17 +0200
[LeetCode] question 88: merge two ordered arrays
Title:
Give two ordered integer arrays nums1 and nums2, and two integers m and n, representing the number of elements in nums1 and nums2 respectively
Please merge nums2 into nums1 so that the merged array is also arranged in order
Note: the merged array should not be returned by the function, but stored in the array nums1. It is assum ...
Added by Tilemachos on Mon, 06 Dec 2021 04:33:30 +0200
IO multiplexing -- detailed explanation and example of poll
1, poll system call Poll and select adopt the polling method, that is, each call scans the entire set of registered file descriptors and returns the ready file descriptors to the user program. Therefore, the time complexity of their algorithm for detecting ready events is O(n). However, the way in which poll describes the fd set is different fr ...
Added by Branden Wagner on Wed, 24 Nov 2021 09:18:16 +0200
[programming art] design C language interface in handle form
Welcome to my official account, and get more of my notes.
O_o >_< o_O O_o ~_~ o_O
this paper introduces how to design C language interface in the form of handle.
interface design is essential in the implementation of collaborative development projects. For C + +, there are many interfaces using class member fu ...
Added by dror_israel on Fri, 15 Oct 2021 00:55:16 +0300
Understanding and application of pointer reference
1. Pointer
The pointer variable can be used to save the address (usually understood as an address)
When we read a pointer, we have to know two things
1) Pointer type
From a syntactic point of view, you just remove the pointer name from the pointer declaration statement, and the rest is the type of the pointer. This is the type of the pointe ...
Added by Simon Mayer on Tue, 28 Sep 2021 13:14:02 +0300
C + + smart pointer
Using heap memory in C + + programming is a very frequent operation. The application and release of heap memory are managed by programmers themselves. However, using ordinary pointers is easy to cause problems such as memory leakage (forgetting to release), secondary release, memory leakage in case of program exceptions, etc. All C++11 introduc ...
Added by Canadiengland on Fri, 03 Sep 2021 08:35:43 +0300