Id |
Category |
Key words |
Description |
1 |
Data type |
bool |
Basic Type--Boolean type |
2 |
Data type |
Char |
Basic type--character type |
3 |
Data type |
wchar_t |
Basic type--wide character type |
4 |
Data type |
Double |
Basic type--solid type |
5 |
Data type |
Float |
Basic type--floating-point type |
6 |
Data type |
Int |
Basic type--integral type |
7 |
Data type |
Long |
Basic type--long integer type |
8 |
Data type |
Short |
Basic type--short integer type |
9 |
Data type |
Signed |
Basic type--Signed integral type |
10 |
Data type |
Unsigned |
Basic type--unsigned integral type |
11 |
Data type |
False |
Boolean type--False value |
12 |
Data type |
True |
Boolean Type--truth |
13 |
Data type |
Enum |
base class Type-enum type |
14 |
Data type |
Union |
Base class type-union type |
15 |
Data type |
struct |
base class type-struct type |
16 |
Data type |
TypeName |
This keyword is used to represent a common type when defining a template. |
17 |
Data type |
typedef |
Alias--Used to alias data type |
18 |
Data type |
sizeof |
Length calculation-The length of bytes occupied by the calculation type |
19 |
Condition control |
Switch |
Switch Branch statement |
20 |
Condition control |
Case |
Switch Branch statement--Conditional judgment |
21st |
Condition control |
Break |
Conditional interrupts |
22 |
Condition control |
Default |
Switch Branch statement--default branch |
23 |
Condition control |
Continue |
Skip Continue |
24 |
Condition control |
Do |
Cycle |
25 |
Condition control |
Else |
Branch |
26 |
Condition control |
For |
Cycle |
27 |
Condition control |
Goto |
Jump |
28 |
Condition control |
If |
Branch |
29 |
Condition control |
While |
Cycle |
30 |
Condition control |
Return |
Return |
31 |
Semantic retouching |
Auto |
Declaring a variable's lifetime is automatic, and the variable defined in any class, struct, enumeration, union, and function is not treated as a global variable, whereas a variable defined in a function is considered a local variable. This keyword doesn't write much, because all variables are auto by default. |
32 |
Semantic retouching |
Const |
The const-modified items are protected against accidental changes and can improve the robustness of the program.
- A modifier function parameter (non-intrinsic type), which is a const reference pass.
- The decorated return value (the return value is a pointer type) can only be assigned to variables of the same type.
- Modifier variables
- Modifier pointer variable
|
33 |
Semantic retouching |
extern |
Declare and reference this variable as an external variable that exists in a file in the project. |
34 |
Semantic retouching |
Friend |
Declare a friend function or class. |
35 |
Semantic retouching |
Inline |
The declaration defines an inline function, which embeds the called code into the main function at compile time. |
36 |
Semantic retouching |
Private |
access Rights : the class private function and the data member's label. Private members are accessible only to member functions of the class itself. Inherit permissions : All member access permissions for the parent class become private in the subclass. |
37 |
Semantic retouching |
Public |
access Rights : class public functions and data members are marked. can be accessed by object or class name. inherited permissions : The access rights of the parent class members are unchanged in the subclass, and are still their original permissions. |
38 |
Semantic retouching |
Protected |
access Rights : class-protected functions and data members are marked. Protected members are accessible only to member functions of the class and to member functions of their derived classes. inherited permissions : The public member access rights of the parent class become protected in the subclass, and the protected members and private members of the parent class maintain the same permissions on the child class permissions. |
39 |
Semantic retouching |
Register |
This keyword commands the compiler to increase efficiency by having variables in the CPU internal registers as much as possible, rather than through memory addressing. |
40 |
Semantic retouching |
Static |
Process-oriented static keyword To define a static global variable :
- The scope is in this file and is not visible in other files.
- Uninitialized static global variables are automatically initialized and automatically initialized to 0 by the program.
- Static global variables allocate memory in the global data area.
Defining static Local variables
- The scope is a function in this file, initialized only once, and the value is persisted to the next call when the function is called multiple times, until the new value is assigned next time.
- Static local variables are typically initialized at the declaration and, if not explicitly initialized, are automatically initialized to 0 by the program.
- Static local variables allocate memory in the global data area.
Defining static Functions
- Only visible in the file it declares.
Object-oriented static keyword Defining static data members for a class
- Static data members are treated as members of the class, all objects share access, and their values can be updated.
- Static data members comply with PUBLIC,PROTECTED,PRIVATE access rules like normal data members.
- Static data members are stored in the global data area. Static data members are defined when space is allocated.
- The static data member initialization format is as follows: Data type >< class name >::< static data member name >=< value
- Two ways to access static data members:
Class object name >.< static data member name or Class type name >::< static data member name > static data members advantages (compared to global variables)
- Static data members do not enter the program's global namespace, so there is no possibility of conflicts with other global names in the program.
- Information hiding can be implemented. A static data member can be a private member, while a global variable cannot.
Defining static functions for a class
- Static functions are treated as members of the class, and all objects share access.
- You need to add the static keyword when declaring inside a class without adding the static keyword when you define it outside the class.
- A non-static member function can arbitrarily access static member functions and static data members.
- It does not have the this pointer, it cannot access non-static data members that belong to a class object, and cannot access a non-static member function, it can only invoke the rest of the static member functions.
- Call Format:
Class name >::< static member function name > (parameter table) |
41 |
Semantic retouching |
This |
|
42 |
Semantic retouching |
Explicit |
The constructor used to modify the class's single argument is automatically type-converted, indicating that the constructor is explicit and that the implicitly-converted program will not pass. |
43 |
Semantic retouching |
operator |
For operator overloading |
44 |
Semantic retouching |
Virtual |
Declares a virtual base class or virtual function. |
45 |
Semantic retouching |
Volatile |
The description variable can be implicitly changed in program execution, indicating that the value of a variable may be changed externally, and the optimizer must carefully reread the value of the variable each time it is used, rather than using the backup stored in the register. |
46 |
Semantic retouching |
void |
Declares a function with no return value or no parameter, declaring an untyped pointer. |
47 |
Exception handling |
Throw |
The exception-handling statement. |
48 |
Exception handling |
Try |
The exception-handling statement. |
49 |
Exception handling |
Catch |
The exception-handling statement. |
50 |
Exception handling |
Finally |
The exception-handling statement. |
51 |
Exception handling |
Bad_cast |
Exception handling related. , defined in the TypeInfo file. |
52 |
Exception handling |
Const_cast |
Exception handling related. |
53 |
Exception handling |
dynamic_cast |
Exception handling related. |
54 |
Exception handling |
Reinterpret_cast |
Exception handling related. |
55 |
Exception handling |
Static_cast |
Exception handling related. |
56 |
Memory operations |
New |
Request memory. |
57 |
Memory operations |
Delete |
Free memory. |
58 |
Classes and templates |
Using |
Imports the namespace into the compilation unit. |
59 |
Classes and templates |
Namespace |
namespace keyword |
60 |
Classes and templates |
Class |
class keyword |
61 |
Classes and templates |
Template |
Template class Keywords |
62 |
Other pending points |
Type_info |
|
63 |
Other pending points |
typeID |
|
64 |
Other pending points |
Bad_typeid |
The Bad_typeid essence is a class, defined in the TypeInfo file. |
65 |
Other pending points |
Asm |
ASM has been replaced by __asm, which is used to program assembly language embedded in C + + programs to optimize code in some ways. |
66 |
Other pending points |
mutable |
|
67 |
Other pending points |
Except |
|