Detailed explanation of C/C++ typedef usage
1, Introduction to typedef
Four common uses of typedef:
1. Alias a defined variable type 2. Define function pointer type 3. Define array pointer type 4. Define a new simple alias for complex declarations
To sum up, "the type is the same with or without typedef". This sentence can be understood as follows: If it is an array before t ...
Posted by cmpennington on Sat, 25 Sep 2021 18:13:58 -0700
Detailed explanation of C language operators
Pay attention to one button three times (don't be sure next time)
Hello, bald men. Let's study operators together today!
Key points of this chapter
Introduction to various operators.Expression evaluation
Operator
Classification:
arithmetic operator Shift operators Bitwise operators Assignment operator unary operator Relatio ...
Posted by nahydy on Sat, 25 Sep 2021 11:56:53 -0700
New features in C++11
New features in C++11
Article catalog
1, Range based for loop
C++ 11 provides a special version of the for loop. In many cases, it can simplify the processing of arrays, which is the range based for loop.
When working with an array using a range based for loop, the loop can automatically iterate once for each element in the ...
Posted by AustinP on Sat, 25 Sep 2021 10:43:14 -0700
C + + Beginner Level -- Introduction to C + + Basics (unfinished)
1) Foreword
In 1979, Benjani of Bell Labs and others tried to modularize the unix kernel when they tried to analyze the unix kernel, so they extended it on the basis of C language, added the mechanism of classes, and completed a runnable preprocessor called C with classes.
C++98: the first version of C + + standard, which is suppo ...
Posted by CAM on Sat, 25 Sep 2021 00:23:34 -0700
Unit 6 dynamic programming 6.1 example: Digital triangle
6.1 example: Digital triangle
[problem description] there is a digital triangle with layer number n (n ≤ 1000) (as shown in the figure below). There is an ant walking down from the top floor. When walking down one level, it can go down left or right. Find the maximum value of the sum of the numbers it passes through after going to th ...
Posted by Cut on Fri, 24 Sep 2021 21:02:29 -0700
[C language] play with structures -- things about structures!
preface
C language provides different data types, such as int, float, double, char, etc. different types determine the space and expression of a variable in memory. However, when we define a person, it is difficult to define different attributes of a person with the same data type, because people's height, age, weight and other attribute ...
Posted by jawaidpk on Fri, 24 Sep 2021 19:32:36 -0700
Heap of data structures
heap
Heap is a special kind of data structure in computer science. Heap is usually an array object that can be regarded as a complete binary tree.
The heap always satisfies the following properties:
The value of a node in the heap is always not greater than or less than the value of its parent node;Heap is always a complete binary tree.
The ...
Posted by seaweed on Fri, 24 Sep 2021 16:52:48 -0700
[C language] super detailed explanation ☀️ What kind of needle is the pointer? (solve the pointer problem at one time) (advanced level of pointer)
What is the needle in front? This article has written the basic knowledge of pointers, and then through this article to have a deeper understanding of pointers
catalogue
1, Character pointer
2, Pointer array
3, Array pointer
Array name and & array name
Use of array pointers
4, Function pointer
Function address
Funct ...
Posted by danwatt on Fri, 24 Sep 2021 16:49:02 -0700
Fields, properties, index ers, and const ants in C #
The essence of a program is "data + algorithm". The following four members are used to represent "data".
field:
1. What is a field
(1) A field is a variable that represents an association with an object or type (class and structure)
The essence of a field is a variable, which is used to store data. A field is used to s ...
Posted by ziggy3000 on Fri, 24 Sep 2021 08:57:16 -0700
C + + implementation calculator
1, Experimental objects
1. Master stack operation and application;
2. Understand the robustness of the algorithm;
2, Experimental contents
1. Implement lp, rp and operate functions in calculator class;
2. Improve the evaluate function of calculator class and increase the legitimacy check of input, including filtering out all illegal inputs ...
Posted by dashti on Fri, 24 Sep 2021 06:55:41 -0700