"C ++ Primer" reading note 2

zhaozj2021-02-16  61

Scope of notes: 1.2

In the 1.1 section, the author puts forward a problem with the idea of ​​dividing and solving the essential thinking, I will repeat it here again. Before learning a new thing. It is best to start from its thoughts. It is best not to do it in the machine before reading the second article, and the advantage is that you can avoid a lot of inexplicable stupid problems. In this regard, I will try to prove in the future notes. In this section, the authors put forward an important thing. Graduated design method, I first saw this way is in the great "THE C Programming Language", this idea is really benefiting for me. The author's explanation here is: "Provide a good way to control an inevitable error in a program," in me. It is far more than that. In the process of learning, this approach makes us more clearly know the role of each additional new thing, this benefits have been reflected in this section. During this design, the author taught us four aspects. The most basic thing.

First: Basic concepts, many people think that this book is not suitable for beginners in the true sense. In this year's second phase of "programmers": before reading this book. You must at least have some programming knowledge, and individuals think that this is not absolute. As long as you read it seriously. In-depth understanding of this part, what is a deep understanding? For example: When the identifier is told, the author puts forward two other names. Symbol variables and objects. A little experienced person knows. Variables and objects are different, then when we write down such sentences

Int a;

Can we affirm A is an integer variable? Or is it an object of an int class? Of course, we can judge if we add something.

INT A = 10; // Obviously, this is the usage of general variables

INT a (10) // This is almost a method of class object

In addition to the introduction of the introduction, we have not yet available for more explanations about the object. We can't affirm it. But doing this is what we can do. Is it too high for beginners? OR YES, but the development of this habit is absolutely necessary.

Second: About the compiler's instructions, this biggest gain is to understand using and. H 's relationship, many of the discussions of beginners are about this. This is also the drawback of it, they don't understand what they are using. Moreover, the description of the page tells us that this will also look at the compiler. So sometimes this is right, it is wrong. After reading this, at least save a lot of time to ask questions. Next is the error changing function of the compiler. Obviously there are only two categories here. This can tell you that you have to work hard to compile errors.

Third: About the data type. Here the author tells us two types of data types, which is the built-in basic data type and extension of the basic data type. When reading this paragraph. There are two problems that make me very wonderful, the first question is: there is a built-in built into the sad undergraduate textbook, which is extension. I threw this question to my professor. But his answer made me more wondering. He said that these are new things (he refers to the 1998 standard. In the foreword, there is a description), about this, I am not convenient to say anything (my life is in his hand). I just want to remind everyone that I have now 2004. Another question is why there is no array and a pointer? This problem has been stayed before I read 2.1. I don't want to say my understanding here. I just want to give beginners a suggestion, the first thing is a bit difficult, we should learn that when reading these things, put forward your own problems and give yourself a reasonable answer, or simply stay in your mind, go to you You will feel very bad. . . Yep. I called it "sense of accomplishment".

转载请注明原文地址:https://www.9cbs.com/read-16085.html

New Post(0)