Structure, enumeration, union
structural morphology
Why does struct exist?
Computer is to solve people's problems. People know the natural world through "attributes".
The attribute set abstracted from anything can be used to represent a class of things and types. In this work, c, struct.
Declaration of structure type
struct tag
{
member_list;
}variable_list; ...
Posted by LostKID on Sat, 30 Oct 2021 16:52:46 -0700
Introduction to C language basic data types
The above picture lists the keywords that define data types, and indicates the occupation and value range of different types in 32-bit machines. Next, let's briefly introduce these three data types.
1. Integer: there are two types of integers: signed and unsigned. Signed integers can be regarded as compatible with negative integers, w ...
Posted by daedlus on Sat, 30 Oct 2021 11:57:17 -0700
Codeforces Round #752 (Div. 2) A B C D
Codeforces Round #752 (Div. 2)
Record high!!
A. Era
Idea: at first, I thought it was to find a maximum subscript, and then output the maximum minus the maximum subscript. Later, I dropped this idea with the data 1 1 5 1 6 hack, and it was obvious that as long as I enumerated it, I saved the largest memory
...
Posted by jaybeeb on Sat, 30 Oct 2021 11:24:42 -0700
C language notes - circular entry questions and guessing games
1, Sort three numbers
Method 1: function
#include<stdio.h>
int MAX(int a,int b)
{
int max=a>b?a:b;
return max;
}
int MIN(int a,int b)
{
int min=a<b?a:b;
return min;
}
int main()
{
int a=0,b=0,c=0;
scanf("%d %d %d",&a,&b,&c);
int max=MAX(MAX(a,b),c);
int min=MIN(MIN(a,b),c);
int mid ...
Posted by JamesWebster on Sat, 30 Oct 2021 03:37:02 -0700
Loop and branch
expression
Expressions are required: the expression part can be relational expressions, logical expressions, and numerical expressions. When entering an expression, you need to pay attention to whether the logic is clear and whether the content of the expression is consistent with your own judgment.
Branch (select)
if statement
Form 1: ...
Posted by adrianuk29 on Fri, 29 Oct 2021 23:22:28 -0700
Distributed system architecture - explanation of basic code iunknown.c of samgr/source system service development framework
Overview of this article
Based on IUnknown, we can develop external interfaces of services or functions. The essence of interface implementation is the conduction of function address and function call. Therefore, IUnknown is particularly important in the basic code of M-core and A-core system service development framework. A component publ ...
Posted by riffy on Fri, 29 Oct 2021 20:28:01 -0700
Introduction to computer C language must see and review the simple knowledge points of C language
Introduction to computer C language must see and review the simple knowledge points of C language
@ Tip: after the article is written, the directory can be generated automatically. Please refer to the help document on the right for how to generate it
preface
How to enter the computer industry starts with this article.
1. Why learn c l ...
Posted by dkjohnson on Fri, 29 Oct 2021 19:57:49 -0700
std::enable_if and boost::enable_if,boost::enable_if_c. differences and relations between
The standard library and the three enablers of boost_ If series of functions can help us overload template functions.
Overloading of general functions
Let's take a look at an example of general function overloading:
#include <iostream>
void print(int i)
{
std::cout << "Integral: " << i << std::endl;
}
void print(d ...
Posted by romeo on Fri, 29 Oct 2021 09:25:57 -0700
c basic knowledge: detailed explanation of multidimensional array
If an array has more than one dimension, it can be called a multidimensional array. Let's take a specific look at the relevant knowledge of multidimensional arrays.
1. How to initialize multidimensional arrays
int days[4][3];
As above, a two-dimensional array is defined. It can be regarded as an array of one-dimensional arrays. We can initi ...
Posted by gtibok on Thu, 28 Oct 2021 20:12:18 -0700
Learning notes: Chapter 3 stack and queue
Chapter 3 stack and queue
Part I stack
1. Definition of stack
A stack is a linear table that is restricted to insert and delete operations only at the end of the table.
We call the end that allows insertion and deletion as the top of the stack, the other end as the bottom of the stack, and the stack without any data elements as an empty ...
Posted by westexasman on Thu, 28 Oct 2021 13:33:09 -0700