Some scattered, instant knowledge points to be dealt with.
The above section is the question, the following part is the answer
Some important concepts:
- A type defines not only the contents of the data elements, but also the operations that can be performed on such data p3
- C + + Each data item has its type P14
- Every name in a C + + program must first be declared and then used P14
- One of the first design focuses of C + + is the ability to define class types that use the same nature as built-in types p17
- The program should try to avoid relying on the behavior of implementing the environment P33
- An object is a memory space that has a certain data type p39
- Initialization is not an assignment p39
- Variables defined outside the body of any function are initialized to 0, and the built-in type variables defined inside the function body are not initialized, and the value of an uninitialized variable is undefined. It is recommended to initialize each variable of a built-in type. P40 "int i is true, but int *i is reversed, and compiler-related?" 】
- The distinction between declarations and definitions is very important p41
Q:
- The definition of a function consists of several parts P3
- What is a built-in type P2
- What is the language of the data type for C + + P28
- Programming language is the two aspects to expand the basic features of the language p29
- The arithmetic type is divided into two classes P30 "What is the arithmetic type of the pointer"
- A byte is 8 bits, the word is 32 bit on the machine, a word of memory area is what form of p31
- If you want to use the same variable in multiple files, you must separate the declaration and definition, how do you do it p41
- The difference between int i = 071 and int i = 71
A:
- return value, function name, parameter list, function body
- Type of language itself definition
- static data type language
- The first is to give the programmer the right to customize the data type, and the other is to encapsulate some useful functions into a library function for the programmer
- Shaping (including characters and Boolean types) and floating-point type
- The former is 8 binary, the latter is the decimal
- The definition of a variable must appear and only appear in one file, while the other file used by the variable must be declared, but definitely not repeated.
"Part One" C + + primer scattered knowledge points