Personal Understanding of C ++ Primer (1), primer
The book C ++ Primer is recognized as the best book to learn C ++, but I don't think it is especially suitable as a teaching material. The order of the content in the book is a bit painful. I personally think that this book cannot be skipped. If you are eager to get started, I recommend C ++ programming.
The first is the first chapter. The first chapter is a brief summary of the first part of this book. For readers with experience in other programming languages, after reading this chapter, we can see the differences between the basic syntax of C ++ and other languages. For readers with no basic knowledge, you can write small programs with the content in the book.
This section mainly introduces the following points:
1. What is the simplest C ++ program.
2. Get a preliminary understanding of the input stream and output stream.
3. What is annotation?
4. Process Control
5. About classes
6. About Compilation
In fact, it is really very general, especially for the Compilation part, I think you can find the information on your own. I think it is very important to understand compilation for C ++ programming.
But there are also several important knowledge points.
1.Main Function
The entry of the program. The program starts to run from the main function. The name of the main function is fixed.
The main function can be interpreted according to the function definition.
First, the function name is main.
The function body is the section enclosed in curly brackets.
Format parameter: NULL, no form parameter (The main function can have parameters.)
Return Value Type: int (built-in type of c ++, which will be described in the second chapter)
Not only are primary functions, but common functions are defined by these four parts.
2.Input and Output streams
The io mechanism of c ++ isStandard Library.
To useStandard LibraryWe can use the provided IO MechanismStandard LibraryFour definedObject.
3.Key terms
Expression:One or more objects and an operator form a result,
Scope OPERATOR:The scope operator is used to tell the program which namespace objects we want to use.
For more details about the other sections.
Readers who have no foundation may be a little hard-pressed to read this chapter and feel that they cannot even read the first chapter. In fact, you don't have to worry about it. I will explain it in more detail later. In particular, the class description is divided into several chapters.
If the readers of the zero base feel very hard, they can read the section of the main function, the comments, and the input and output. Because it will be used immediately and is the foundation of the Foundation. Other things will be discussed later.