- IFNDEF guarantees that the line code is only compiled once
- C + + subroutine naming rules: several words in the first letter of the name, but first letter lowercase
- The delegate type (typedef) naming convention in C + +: Capitalize other text-case blending in the first letter. Constant (define) naming rules: all uppercase.
typedef unsigned int Uint;
int BOOL; #define FALSE O; #define TRUE 1;
- The naming prefix for Boolean variables/functions is
BOOL Ismybook; bool isboy ();
- The scope of the local variable.
C89: Must be defined in front of the function, scope is from the defined position to the end of the function
C + +: The function body is defined arbitrarily, scoped from definition to end of block. So local variables can be duplicate names. When the global variable and the local variable are the same, the global variable is referenced by the: character.
C + + Learning Note 1