Order table delete element with value x

Train of thought: Don't think about deleting words, think about how to save non-x values Two solutions are provided here, which have the same way: 1. Count and save the non-x elements 2. Count the number of elements x, and save the non-x elements matters needing attention: Note that due to the use of reference (&), the code here can only b ...

Posted by GaryC on Wed, 01 Jan 2020 02:08:34 +0100

[novice road to Daniel 12] port management of switch background management is optimized again

Project 12 re optimization of port management of switch background managementProject presentation 1. Why to use pointer The function's value is passed, and the function's arguments cannot be modified by calling the function. 2. Pointer definition What is the pointer The pointer is essentially an address value: #include <stdio.h> int mai ...

Posted by PHPGuru_2700 on Fri, 27 Dec 2019 23:03:00 +0100

c + + - constructor exercise and delete, new

Intensive practice #include <stdio.h> #include <stdlib.h> #include <string.h> #include <iostream> #include <fstream> using namespace std; class ABCD { public: ABCD(int a, int b, int c) { _a = a; _b = b; _c = c; printf("ABCD() construct, a: %d,b: %d,c: %d \n" ...

Posted by dgudema on Sat, 21 Dec 2019 21:45:12 +0100

[C learning notes] C language realizes Pos(), Copy(), Delete() functions of Delphi

This code was originally created by blogger Huang Renlai. For reprint, please indicate the source: https://blog.csdn.net/weixin_43334745 2018-10-05  Recently, I am learning C, deeply aware of the power (and danger) of the C pointer. If I master it well, I will control the memory like a fish in water; if I master it badly, I ...

Posted by Jeb. on Fri, 20 Dec 2019 18:00:49 +0100

C Language Notes 07_Enumeration&Pointer

Emum (enumeration) Enumeration is a basic data type in C. It can make data more concise and readable. Enumeration grammar is defined in the following format: enum enumeration name {enumeration element 1, enumeration element 2,...}; For example, if there are 7 days in a week, instead of enumeration, we need to use #define to define an alias for ...

Posted by goodtimeassured on Thu, 19 Dec 2019 10:39:52 +0100

Merge two circular single chain tables into one circular single chain table

Before merger After merging Specific ideas: Define a pointer p to the head node of La to traverse it to the last node (P - > pnext! = LA) Define a pointer q to the head node of LB to traverse to the last node (P - > pnext! = LB) LA tail node points to LB head node (the node with the first valid data) (P - > pnext = LB p ...

Posted by NDK1971 on Sun, 15 Dec 2019 18:37:27 +0100

IATHook learning on Windows

Simple Demo IATHook principleIATHook refers to the import table function of a process. When the program runs, IAT will fill in the actual memory address of the function, which is usually in a dll memory loaded! Then we change the address value to the address where our self written function is located. When the system calls the IAT function, it ...

Posted by Mount Tropolis on Fri, 13 Dec 2019 21:07:15 +0100

Push box game code of C language

  PrefaceThe text and pictures of this article are from the Internet, only for learning and communication, not for any commercial purpose. The copyright belongs to the original author. If you have any questions, please contact us in time for handling.By Yan Yu less textNote to novice: if you can't find a solution to the problem in your st ...

Posted by adavis on Mon, 09 Dec 2019 00:51:30 +0100

c language to solve such a six digit: SQRT (six digits) = three digits, nine digits are different from each other (SQRT represents the square root)

(1) set the status array p of 10 elements, and record the occurrence of the numbers 0-9 in 6-digit and 3-digit. All array elements are assigned a value of 1, indicating that the numbers 0-9 have not been used. (2) for each number of attempts, 3 digits x, 6 digits = x*x, and each digit is taken as the subscript of the array. If the corresponding ...

Posted by sathi on Sun, 08 Dec 2019 19:31:00 +0100

Bubble sorting, implemented by C language

Bubble sorting is a kind of stable sorting, the average time complexity is O(n^2), the best time complexity is O(n), the worst is O(n^2).   During sorting, only the size of the current element and the next element are compared each time. If the current element is larger than the next element, it is exchanged. In this way, each round of sorting ...

Posted by NikkiLoveGod on Mon, 02 Dec 2019 09:30:11 +0100