1. Main content
This paper introduces the core idea of programming language and the basic concept of C + +.
The impression is more profound is divide and conquer (divide and Conque) decomposition thought.
2. Knowledge Square
1) C + + file suffix
2) compiler function
- One, check for errors (syntax errors, type errors);
- Two, code generation (generate target code or assembly instructions)
3) Implicit conversion of built-in types
4) #include指示符读入指定文件的内容.
- <> represents a project or standard header file. Find from the environment variable path.
- "" indicates that the user supplied the header file. Finds from the current directory.
- Nested header files are introduced, prompting #ifndef to appear to avoid the introduction of a header file repeatedly.
- C C + + name of the library header file: Cassert "requires the use of namespace Std to introduce C + + name definition", c name assert.h.
5) Define preprocessor constants
-D Name
__cplusplus:c++ file, __stdc__:c file
__time__: Time, __date__: date;
__FILE__: Compile file, __line__: number of compiled lines. "Can Change"
6) input/output stream
Standard Iostream:cin,cout,cerr are pre-defined iostream objects. Endl is a iostream operator that represents an operation that refreshes the output buffer in addition to the data that provides a newline character.
The file Fstream:ifstream,ofstream object.
C + + Primer reading notes (i) First: C + + Overview, chapter I: Getting Started