C ++ learning methods and Book recommendations
Author: MatrixCpp Source: CSDN responsible editor: Wang yuhan (1) C ++ I understand now
For various reasons, a lot of energy has to be invested in learning and using java. to form a series of articles to learn C ++, there is no style or timetable, write it wherever you think of it. Here we take part of an article published by another ID as the first in this series.
Learning C ++ focuses on understanding the semantics represented by its various language facilities and the design ideas represented by the semantics represented by C ++. First of all, you need to understand that C ++ is the essence of programming language. Here I will write down the most important nature of C ++: C ++ is a static type check. Based on the C memory mode, it supports four basic programming paradigm languages. Note: The three essential features are described here. The static nature of the language type check is described, the C memory mode tells us that all memory-related operations in C ++ require the programmer to be responsible for themselves, which brings a lot of attention to programming, the four basic types supported by comprehension are the basis for understanding various language facilities. Remember that the biggest design philosophy of C ++ is also an essential part of its Application of C ++, I quoted a sentence in the preface of C ++ PRIMER, saying: "The foundation of C ++ is various facilities. They allow users to extend the language by defining new data types, these new types can be used in the same way as the built-in types (how to understand this sentence is the key, my understanding is: User-defined types can be used as an alternative when any built-in types are used, specifically, user-defined types can be declared as built-in types, and their objects can be initialized and copied to each other. They can be used together with many operators as built-in type objects, can be passed to a function as a parameter, can be used as the return value of the function, can be used as the operation object of the container, and the user-defined type can be the same as the built-in type as the template parameter ), master these facilities (what facilities? It is a facility that makes user-defined types as easy to use as built-in types, including what? The first step to construct, copy, deconstruct, and manipulate sub-loads is to understand the basic language (what is the basic language? Is better C in c ++ ).
Here, I also want to propose an important concept: the most essential thing of a language is its type system. Any language has its own unique type system, learning C ++ is to learn its type system. Therefore, we must first thoroughly understand the concept of data types. In this way, your idea is clear. You have a choice to start learning from every design model supported by C ++.
Structured Design ----- better C in c ++, you need to learn the new features of function overloading and referencing on the basis of C.
Based on the object-you need to establish the most powerful concept of C ++-class, that is, user-defined type, which is actually the concept of abstract data types in the data structure, and a series of language measures to reasonably construct the use class. Keep in mind that classes are used to represent the concepts we need to express in C ++ design. Class is also the core concept in the C ++ abstraction mechanism.
Object-oriented ---- here you need to know the OO concepts such as inheritance and polymorphism, as well as common design technologies such as handle classes. here you need to understand that you have entered the stage of interface programming. At the same time, you must learn the OO idea. Some facilities of C ++ are just to fully express the OO idea in the semantics supported by the language. However, the semantics that C ++ can express at the same time is limited by the original language design principles (what principles? Static type check does not cost anything you don't need. The choice lies in the programmer's hands and the language itself does not force the programmer to make the choice ), that is to say, the OO thought that C ++ can express can be called the OO thought with C ++ characteristics. Which of the following is better for such OO ideas and pure OO represented by JAVA? No conclusion, because they have different design concepts.
Generic Design ---- here you need to understand the most important point is that the temlate mechanism of c ++, no matter what its initial intention is, is as follows: the derivation of types during compilation, that is, the polymorphism during compilation, thus understanding the core of generics-the embodiment of various types as an abstract condition, can C ++ define abstract conditions? No, so these conditions can only be defined in our own minds, but we can regard the specific type as an abstract condition to implement in the template mechanism, so that tempalte becomes something more advanced than the type derivation mechanism, that is, the derivation of abstract conditions. That is to say, we no longer regard the parameters accepted by the template as types, but the template as a mechanism to accept abstract conditions, regardless of its type, as long as this type meets the abstract conditions accepted by tempalte, it can be passed as a parameter. This represents a general idea. The type is no longer fundamental, but the abstract condition is, type is just the coat of abstract conditions and the implementation method in C ++. The industrial product that was born with the combination of the two abstract design patterns, Object-based and generic design, is STL.
(2) the temptation of books
C ++ programming language: If you only buy a C ++ book, this is your choice. The author Bjarne is the full reason for you to make such a choice, no one knows more about the true use of C ++ programming than he does. Some people say that the language of this book is obscure, or it is not suitable for beginners. I disagree with this comment, I am reading the Chinese version. At least in my opinion, the language tracing is very good. I like this technical tracing style. The core of the book is to tell you how to write correct C ++ code with correct ideas. It is strongly recommended.
C ++ language design and evolution: This book is also one of the two books that I have both Chinese and English versions (the other is design patterns). If you need a second book after you get the book above, then in my opinion this is your choice. The author is also Bjarne, in this book, he will show you the origins and development of C ++, the principles and nature of language, the reasons and considerations for adding various features, and almost all interesting stories about C ++. I have read both Chinese and English versions and are strongly recommended.
C ++ Library: the most popular C ++ book comment on Amazon. The introduction of the standard library in the book is simple and simple, and the book is based on actual use. The examples in the book are simple but very informative, and the concept of some charts is very clear, in addition, both manual and learning have their own values. It is strongly recommended.
Effective c ++ Chinese version: You can find this book in any C ++ Book recommendation directory. The main emphasis is what must be paid attention to when using various features of C ++, as well as some common design methods. Its short and refined language is naturally very suitable for the fast-paced modern style, and I personally like Meyer's writing method. It is strongly recommended.
"More effective c ++ Chinese version": as the sister-in-law of the previous book, the same writing style and the same writing purpose. I personally think that there is a gap with my sister, mainly because the amount of information is not as large as the Chinese version of Objective C ++. I mainly talked about some of the common design techniques of C ++. Recommended.
C ++ PRIMER Chinese edition: also from the master's hand, author LIPPMAN, as one of the early C ++ compilers, he has his own unique insights on his understanding of C ++ and how to explain the sequence. As an encyclopedia of C ++, it has the same status as C ++ programming language. However, the former emphasizes the syntax and semantics of C ++, while the latter focuses on how to use C ++ for rational design. The book has a very clever conception. From the very beginning, the book directly entered the theme of C ++. the first five chapters use classes to design a data structure, let the reader fully understand the abstract capabilities represented by various user-defined types, and then directly enter the container class in Chapter 6 standard library, this design makes the reader very clear about the very important concepts of the two C ++ containers and classes. This design is very effective for C ++ readers who have a certain foundation. But for beginners, this is indeed not a suitable book, because too many terms will scare people who have just been in contact with C ++. Recommended.
C ++ meditation: a very distinctive book. The book assumes that the reader is familiar with the C ++ language, focus on the concepts of C ++ and some design methods of C ++. For example, why is C ++ better than C or other process languages? (The answer in the book is that only objects can maintain a certain state, but algorithms do not.) How to Design Abstract Data Types and understand polymorphism, how to use proxy to hide inheritance, how to use the quote technology, how to perform slow copy for efficiency, and how the template technology evolved into an STL library. Like C ++ programming language, I think it is very thoughtful. I am tired of reading such a book and have to keep thinking about the problem, think about the problems raised by the author and the solutions proposed by him. The biggest feature of this book is that it directly exposes the core of the C ++ language-the support for these three abstract models by the three abstract models and the language facility itself. The "C ++ meditation" gives me a deeper understanding of what is the most reasonable way to use C ++. Recommended.
C ++ STL Chinese version: Very simple, not fancy, but very valuable. I personally think that the main value of iterator is embodied in the following aspects: 1. Two methods are generally used to describe key iterator implementations of STL, a relatively old-fashioned function method, one is new? Traits skills, so that readers can clearly understand the evolution of technology. 2. An stl lite version is provided, which greatly improves the reading of such code. 3. The test module provided in the book is also a very rare chapter for readers. To expand STL, you can test your STL components according to the methods provided above. Disadvantages: the binding is rough and not commensurate with the master's position. Recommendation
C ++ primer plus Chinese edition: a book that is not very thoughtful and not very skillful, but very suitable for beginners. Many of the Methods of order are specific. In general, this book is the most suitable for beginners in C ++ books I have read. Recommended.
In-depth exploration of the C ++ object model: this is also a special book that tells you how the compiler arranges the memory space for processing objects and how some OO features are implemented. I don't think this is a must-have book for C ++. It should be appropriate to read books after class, because it is better to spend some time figuring out the essential concepts of OO theory if you have time to understand the OO IMPLEMENTATION OF C ++: type theory. Recommended.
C ++ new design thinking-Application of generic programming and design patterns: an odd book in C ++. Such a book makes it difficult for people to make correct comments and recommendation indexes (especially for those who are practical and should have fun in their lives ~ :), Because the book represents a somewhat impractical ideological avant-garde, and the mode + generic-How elegant the combination is. My personal opinion is that only some people need to read this book. They are called real c ++ fans. For the time being, do not mention whether C ++ has encountered any difficulties, programmers who do not have any feelings for C ++, as shown in their books, (feelings are based on love, rather than saving money ), I think there will always be a dizzy feeling for such design technology, and most programmers will not like this feeling ~ :). Recommended.
Object secrets: Java, Eiffel, and C ++: from the title, we can see that this book is not only related to C ++. It can be said that the book is a criticism of C ++ (the book also originated from an article criticizing C ++ by the author ). Sometimes it is very helpful to listen to another voice to keep a clear mind, treat a person, treat a book, and treat a programming language. This book does not seem to be very popular. It is probably not very popular with its propaganda, or readers who can understand these three languages at the same time and are more interested in the deep-seated superiority of these languages have little to do with it, in my opinion, this book contains many theories about objects and types, the most brilliant demonstration process is that the author grasped Bjarne's "incorrect" remarks such as "one class in C ++ is one type. Another advantage of reading this book is that it can teach everyone how to reasonably argue with their opponents ~ :). Recommended.
Large-scale C ++ programming: The book has been in the hands for a long time, but it has not been carefully read, which must be explained before the comments. In general, many things in the book are rarely seen in other reading books. Whether or not AMAZON's comments are outdated, at least many of the comments I have introduced are unknown to me, and others say that they are outdated. I recommend it.
STL and generic programming: a rare book on the concept of generic programming is also used as a manual and learning, but its manual is not a user manual, but a conceptual manual, this book is very helpful for designing your own STL components. Although there is an STL document on the internet, 70% of the content is the same as this book, it is still readable. Recommended.
C ++ programming ideology version 2: a very general book. Yes, this is my comment on this book which many people regard as a famous book. Why is this comment, or if you don't believe what I mean by objective words, you can see it after you buy it. Average.
"Essential C ++ Chinese version": I always feel that this book is not very clear, because for beginners, it involves too many nouns. Beginners read this book, almost never expect a good start. For advanced students, there is no new content. For C ++ experts, such a small reading book is not necessary at all. Maybe it is the famous name of LIPPMAN + JJHOU, but I think this is a real man ~ :). Average.
STL source code analysis: One of Hou SIR's two books in mainland China, but in my heart, its quality does not seem as good as what many people have said, compared with similar works "C ++ STL Chinese version", the content is a little thin, and many things are piled up after three chapters, in addition, most of the wonderful materials are from the book STL and generic programming. It gives people the feeling that there are not many things in the book Hou SIR, however, the second chapter has a good description of memory management, and is well-bound. Especially those pictures are the best tricks of Hou SIR, but the overall feeling is a bit flashy. Average.
The two are not recommended, so the specific reasons will not be analyzed.
High quality programming guide-C ++/C language and C ++ coding specifications
Two other common C ++ books:
I have not read the Chinese version of predictional C ++ and the Chinese version of More predictional C ++, but its reputation is not small, in addition, the experience of sending an email to Herb Suter, the author of this book, the kind of attitude to the technical explanation given that the time difference is less than 24 hours, I also recommend these two books to you, because in my opinion, Herb's Sutter ability does not need to consider such an attitude towards others, so it is worth reading.
Yes, it's the C ++ books I 've seen over the past half a year. It must have been a joke on me ~ :), Actually, I am a nerd. As to whether I need to read so many books, my personal opinion is not needed. What else will I do if I still give a recommendation grade? Select what you need is the best. Reference someone once said-the evaluation is actually a matter of "drinking water, cold self-knowledge. Where are the real book reviews? Their hearts.
Readers who are interested in this article have also read: