Common keywords in C language:
Char: + = declares a character variable or function
Double:=> declaring a dual-precision variable or function
Enum: = = declares enum type
float: = = declares a floating-point variable or function
int: = = Declares an integer variable or function
Long: = = declares a length integer variable or function
Short: = = declares a shorter integer variable or function
Signed: = = declares a signed type variable or function
struct: + declares struct-body variable or function
Union: + = declares Union data type
unsigned:=> declaring unsigned type variables or functions
void: = = declares that the function has no return value or no parameter, declares an untyped pointer (basically three effects)
1. Looping statements
For: = = A looping statement (can be sensed inexpressible)
Do: + = loop body of the loop statement
While: = = loop Condition of the loop statement
Continue:=> end the current loop and start the next cycle
2. Conditional statements
if: Conditional statement
else: + = Conditional Statement Negation branch (with IF)
Goto: = = Unconditional Jump statement
3. Switch statements
Switch: = = for switching statements
Case: = = Switch Statement Branch
Default: The "other" branch in the switch statement
4.
Return:=> subroutine returns statement (can take parameters, also see without parameters)
5. Storage Type keywords:
Auto: ~ = Declares that automatic variables are not used in general
Extern:=> declares that a variable is being declared in another file (and can also be considered a reference variable)
Register:=> declaration of the accumulation device variable
Static:=> declaration of statically variable
6. Other keywords:
Const: = = Declares read-only variables
sizeof: = = Calculate data type length
Typedef:=> used to alias data types (and, of course, other functions)
Volatile:=> explanatory variables can be implicitly changed in program execution
Keywords in the C + + language
Asm
= = Inserts a assembly instruction. Assembly code often appears, if there are multiple assembly code can also be enclosed in curly braces
_asm
{
MOV ecx,10;
Rep movs byte ptr [edi],byte Ptr[esi];
}
Auto
=>auto is a new type of C + + standard that can automatically determine variable types based on data type
Variables that are generally defined inside a function that do not add any other modifiers are automatic variables
bool
-= = Declares a Boolean variable.
Break
= = End a loop.
Case
= = Part of a switch statement.
Catch
= = Handles the exception generated by the thrown.
Char
= = Declares a character-type variable. Example: Char ch[10];
class declares a category. Example: Class a{
Public:a ();
Private:int A;
};const
Const = Declares a constant. such as: const int i = 6; A constant is defined, and the value of the constant is not changed.
Const_cast = is thrown from a const variable.
Continue = is used to jump out of this loop and continue with the next loop.
In the default =>switch statement, defaults indicates the direction of the left branch, and when all case conditions are not met, the program goes to the default branch.
Delete = Frees memory. Use when declaring dynamic space
dynamic_cast = dynamic projection. See http://blog.csdn.net/gogogo/article/details/7073981 for the method of use
Enum = Creates an enumeration type. Enumeration format: Enum < enum type name > {< enumeration Table >}; (see Example 1) Enum {< enumeration table >}< variable table >; The first enumeration value corresponds to an integer number, typically the first enumeration value corresponds to the constant value 0, followed by the lower one.
enum BOOL {false,true}; The bool type is a pre-defined enumeration of C + +
explicit = = Keyword explicit can prohibit "single-argument constructors" from being used for automatic type conversions
extern = tells the compiler about global variables that have been defined elsewhere.
false = = belongs to a Boolean value.
Friend = allows non-function members to use private data.
goto = Jump to other places in the program.
inline = defines a function as inline. The inline function, from the source code layer, has the structure of the function, but after compiling it, it does not have the properties of the function. At compile time, similar to macro substitution, use the function body to replace the function name at the call. It is generally decorated with inline in your code, but whether you can form an inline function, you need to see the compiler's specific handling of the function definition.
Mutable = ignores the const variable. namespace = divides the namespace with a defined range.
New = allows you to dynamically store a variable.
operator = Create overloaded functions. See http://blog.csdn.net/liuyang1990i/article/details/8194803 for details.
Keywords used in the class:
Private = Declares a privately-owned member in a class.
protected = declares the protected member in a class.
Public = declares a common member in a class.
Register = = defines a register variable. He can improve the data access speed, can be stored quickly to improve processing efficiency.
Reinterpret_cast=> change the type of a variable.
return = returns from a function.
Signed = Modify the variable type declaration.
sizeof = Returns the length of a variable or type.
static = Usage 1: A static variable declared inside a function that can act as a communication mechanism between objects
usage 2: local static objects
Usage 3: Static members and static member functions
Static_cast = performs a non-polymorphic cast.
struct = creates a new struct.
Switch = allows a variable to execute different code under different judgments.
Template = Creates a special function for you.
This = points to the current object.
throw = Throws an exception.
true = a value of the Boolean type.
Try = Executes an exception thrown by a throw.
typedef = = Creates a new type from an existing type.
typeID = Describes an object.
TypeName + = declares a class or undefined type.
Union = A struct is assigned to more than one variable at its current location.
unsigned = declares an unsigned integer variable.
The Using = is used to enter a namespace.
Virtual = Creates a function that is not considered limited by the constituent classes.
void = declares that a function or data is not associated with a data type.
The volatile = warning compiler about variables may be unexpectedly modified.
wchar_t = declares a character-type variable with a width.
Common keyword explanations for C + +