521-introduction to C + + (function parameters, inlining, function overloading, C and C + + calling each other)

Functions with default values for formal parameters 1. The default value can only be given from right to left 2. Call efficiency 3. Define the default values that can be given to formal parameters, and declare the default values that can also be given to formal parameters 4. When a formal parameter is given a default value, whether given at th ...

Posted by basim on Sun, 05 Sep 2021 22:44:55 +0200

Entry = buried? NO - Master 100 routines of C language, and you will understand!

catalogue preface 1, Examples of C language (4 ~ 10) 2, Summary preface Here we are. We continued with the remaining seven examples last time. We just updated the content of the last 100 routines. Today, we will continue to talk about the remaining seven examples in 1 ~ 10. In the future, we will release 10 examples at one time. The quant ...

Posted by Thunderfunk on Sun, 05 Sep 2021 08:25:18 +0200

Sequential queue, cyclic queue, chain queue

preface Queue is a "first in, first out" linear table. Only one end of the table is inserted (queued), which is called the end of the queue, and the other end is deleted (queued), which is called the opposite end, that is, "tail in, head out". Only the head and tail of the queue can be accessed by the outside world, s ...

Posted by pacholo on Sat, 04 Sep 2021 04:38:24 +0200

Fast power algorithm -- take you from zero to optimize step by step

What is fast power algorithm First of all, let's look at an ACM programming problem. This problem is the problem with serial number 2035 in Hangzhou Electric OJ. Students who have not done this problem can do it together( Click here Transmission), the title is as follows: Problem Description: At first glance, this topic will not be diffic ...

Posted by ichversuchte on Fri, 03 Sep 2021 23:04:21 +0200

C language improvement review 01

Take time to review carefully: Foundation: c language syntax foundation + data structure + system programming Improvement: interface encapsulation and design (module division and fault thinking) + interface api use ability, search ability and implementation ability Jump: win+linux project Simple sorting function: #include "stdlib.h" #inclu ...

Posted by burningkamikaze on Fri, 03 Sep 2021 19:46:19 +0200

Basic data structure - stack (implemented in c language)

Basic data structure - stack Stack is a last in, first out linear table. It is the most basic data structure and has applications in many places. What is stack Stack is a linear table that restricts insertion and deletion to only one location. Among them, the end that allows insertion and deletion is located at the end of the table, which is ...

Posted by jodyanne on Fri, 03 Sep 2021 04:15:14 +0200

Kids learn Java (6): encapsulation

Object oriented has three characteristics: Encapsulation, Inheritance and Polymorphism. This section covers encapsulation. Procedure 1 class Woman { private String name; private int age; private Man husband; public void setName(String name) { this.name = name; } public String getName() { return ...

Posted by Japher on Sun, 19 Jul 2020 17:48:11 +0200

One article tells you how much CPU branch prediction affects performance

originate stackoverflow Last question Why it is faster to deal with an ordered array than to deal with an array without it , there are some discussions in the original text. Let's first reproduce the results and then explain why! We have the following two sections of code. The code looks similar, but in fact, the logic is the same. They count t ...

Posted by ray-solomon on Thu, 25 Jun 2020 14:28:53 +0200

LeetCode, Simple (Issue 13)

Catalog Topic 1: Minimum distance of characters Question 2: Baseball Match Question 3: Determining whether each other is character rearrangement Topic 4: Perimeter of an island Topic 5: The intersection of two arrays Title 6: Calculating prime numbers Question 7: Rotating Array Question 8: The average number of layers of a binary tree ...

Posted by PastorHank on Wed, 24 Jun 2020 03:57:16 +0200

c++ Smart Pointer Learning and Use

Original:https://www.fluentcpp.com/2018/12/25/free-ebook-smart-pointers/ One thing that quickly confuses your c++ code and hinders its readability is memory management.If you don't do it well, this can turn a simple logic into an inexpressive chaotic management and leave your code out of control of memo ...

Posted by lightningstrike on Mon, 22 Jun 2020 02:58:39 +0200