Four Books and five classics of C ++ Programming

Source: Internet
Author: User

C ++ is a large-scale language widely used in industrial software development. Its complexity and ability to solve practical problems make it extremely valuable in academic research and industry. Like C, C ++ has already achieved great success in many important fields.

However, the undeniable reality is that in the field of low-level program design, C ++ compresses C and is also suffering a strong rebound from C. In the field of high-level program design, java and C # are constantly encroaching on the territory of C ++. Maybe the integration of C ++ and C will always be a dream. Maybe the upsurge of Java and C # will force C ++ to return to the development field with fundamental advantages: low-level system program design, advanced large-scale high-performance application design, embedded program design, and numerical science computing. I think this is not a good thing.


C ++ attracts so much intellectual investment that there are so many excellent works in this field, including heavyweight software products, libraries and books. The question "four books and five classics of C ++ programming" is not very strict: four books and five classics of C ++ programming. Yes. In this article (and next), I will recommend more than 20 C ++ books in different categories. You can choose to read them as needed.

TCPL and D & E

TCPL and D & E are short for The C ++ Programming Language and The DesignandEvolution ofC ++, both from BjarneStroustrup. I listed them first because Bjarne is the creator of the C ++ language, and then because it is more important than "first: these two books are undoubtedly masterpiece in the C ++ field. They are the C ++ Language Bible.

Bjarne Stroustrup, The C ++ Programming Language (Special3rdEdition)

C ++ programming language (Special Edition), Mechanical Industry Press

C ++ programming language (Special Edition), Higher Education Press

So far, TCPL is the most authoritative C ++ reference manual in addition to the C ++ standard literature. Unlike most people, I think Bjarne's text language is not inferior to the programming language he created. At least I like this kind of school-style work. This book's description of the C ++ language is clear and straightforward. It looks at C ++ from the perspective of the C ++ language creator. This is something other authors and books cannot do. No one knows how to use C ++ better than Bjarne.

This is a serious book, with medium and high-level C ++ developers as target readers. If you are an experienced C ++ programmer and need to understand more essential C ++ knowledge, this book is exactly for you. It is not the kind of small book that keeps you snoop. You need to learn it carefully and chew it over and over again. During reading, please pay special attention to what Mr. Bjarne emphasized and what he mentioned. I personally like the fourth part of this book, "using C ++ for design ", such content is hard to see in books similar to programming languages-I even think Bjarne should write this part separately.

Bjarne Stroustrup, The Design and Evolution of C ++

Design and evolution of c ++ language, Mechanical Industry Press

Design and evolution of c ++ language (English version), Mechanical Industry Press

D & E is a monograph on C ++ language design principles, design decisions, and design philosophy. It clearly answers why C ++ is like today rather than another language. As the creator of the C ++ language, Bjarne presented his unique and profound insights. In addition to the widely acclaimed language features, Bjarne did not shy away from the controversial and even denied C ++ features. He gave a logically rigorous and convincing explanation. The content covers the prehistoric times of C ++, the design rules, standardization, library, memory management, multiple inheritance, templates of C and C ++ with classes, etc, important new features including the exception mechanism, runtime type information, and namespace are discussed in depth. Every C ++ programmer should be able to deepen his understanding of the language in Bjarne.

Please note that the knowledge of these two books is concentrated and the amount of information is huge. Please do not miss every seemingly casual sentence of Bjarne.

   Getting started

Learning any language requires a gradual process from entry to mastery, from novice to master. However, for a so-called newbie, whether it is a completely new beginner or a "Newbie" who is familiar with a certain language ", it is even difficult to generalize it if you have already made great achievements in the field of language programming? Different C ++ beginners need different entry books.

Andrew Koenig, Barbara E. Moo, Accelerated C ++: PracticalProgramming by Example

Accelerated C ++ Chinese version, China Power Press

Unlike most C ++ tutorials on the market, this book does not start with "C in C ++", but begins with an authentic C ++ feature. From the very beginning, I used the standard library to write programs. As the story goes deeper, I explained the basic concepts that these standard library components depend on. In addition, unlike other C ++ textbooks, this book uses examples to illustrate the language and standard library. The latter two are explained to provide support for the instance program, instead of using the vast majority of C ++ textbooks, examples are just auxiliary tools to demonstrate language features and usage of standard libraries.

The author is world-class in programming practices, education and training, and Technical Writing in the C ++ field. I like this fresh writing style that uses a lot of native features of the standard library and C ++ language. In front of this textbook, almost all C ++ textbooks have been eclipsed or outdated so far. Although this teaching material may be somewhat cutting-edge for college education in China, I strongly recommend it to my colleagues. By the way, in a recent communication between Bjarne and me, he commented on this book: This book may be the best in the world for experienced programmers to learn C ++.

Stanley B. Lippman, Joseph Lajoie, C ++ Primer (3rd Edition)

C ++ Primer (3RD) Chinese version, China Power Press

The name of this book is somewhat misleading. Although the author claims that this book was written for beginners of C ++, it does not seem to be the case whether it is its thickness or its depth of explanation. It may be better to say that it is a C ++ tutorial of "getting started to proficient. I personally think it is not suitable for beginners who do not fully understand C ++. Before reading this book, you should at least have a little background knowledge of C or C ++, or at least have programming experience in other languages.

Although this book omitted some of the advanced C ++ features, it can still be called the most comprehensive C ++ learning tutorial so far. In fact, if a C ++ beginner can read this book and complete all the exercises against C ++ PrimerAnswerBook, he can certainly enter the ranks of professional C ++ programmers. I personally think that even if you already have TCPL, this book still has value, because it is more detailed and understandable in many aspects than TCPL.

Stanley B. Lippman, Essential C ++

Chinese version of Essential C ++, Huazhong University of Science and Technology Press

Essential C ++, China Power Press

It is not strictly believed that this book is a lite version of C ++ Primer. This book describes the most representative topics in C ++, including procedural programming, generic programming, Object-based programming, object-oriented programming, template programming, and exception handling. Stanley lowered the barrier to the most basic level acceptable to new C ++ beginners who have experience in programming in other languages, so that they can quickly start using C ++ programming without reading big headers like C ++ Primer. It uses instance-based learning to help readers grasp the essence of C ++ in the shortest time.

Maybe it may take several hundred pages to give an overview of all aspects of the C ++ programming paradigm, but this book does this incredible. I personally like this kind of book that is full of technology, concise, and "Easy to say. This book also has an obvious style: All program examples are made of standard library components, refreshing.
None of the above three books are written for completely new programmers. New C ++ programmers Can read the new book "ABeginners Introduction to ComputerProgramming: You Can DoIt!". This is also the recommendation of Bjarne. FrancisGlassborow is the chairman of ACCU. Over the years, he has made comments on almost every book of C ++ classics. His own book will naturally attract great interest in the C ++ community.

   Efficient and robust Programming

Two years ago, I wrote a gateway program in charge of a provincial power scheduling system project, which obtained real-time power information from the SCADA system. The communication interface uses an uncommon direct connection to the database (this gateway program connects to SQLServer6.5 at one end and Oralce8.1.6 at the other end ). Since the real-time measurement point is nearly, it is obviously inefficient to update or insert all samples at a time. I have created a memory library in the Gateway Program. The obtained data is compared first, then decide whether to update the physical database (and do other more complex things ......), In this way, the expected results are achieved in both efficiency and resource usage.

This program has been running very well, but one day after leaving the site, the system administrator called and said that it was probably due to network faults or other reasons, sometimes the Gateway Program will crash-it will crash itself. The problem is that it will also make Windows 2000AdvancedServer a "blue screen "! Frankly speaking, I have never seen any unintentional program capable of doing this ". At that time, I was busy with another big project and could not perform on-site debugging. Finally, I had to carefully encapsulate the internal repository code with experience to handle exceptions (and made some other modifications ......). In this way, although the problem is not completely solved, the program will not end up so ugly.

What do you mean by talking about such a piece of highlights here (I didn't think it was a "bonus" when I was thinking about the terrible bug ")? What I want to say is that, for any software, it is impossible to talk about efficiency without being strong. For C ++ programmers, it may not be difficult to write an efficient program, but it is not so easy to write a server software that requires 724 hours of continuous operation. Many factors need to be considered, sometimes these factors are even far beyond the C ++ language and development tools themselves. As a programmer developing real-world project software, we do not have to touch the nails to accumulate experience. As long as we are open-minded enough, others' experience is often a good reference for us. In view of this, I recommend the following books for you to choose from, which can benefit you from both robustness and efficiency (of course, they cover much more than Exception Handling J ).

Scott Meyers, valid tive C ++: 50 Specific Ways to ImproveYourPrograms and Design (2nd Edition)

Scott Meyers, More than tive C ++: 35 New Ways to ImproveYourPrograms and Designs

English version of Objective C ++, Huazhong University of Science and Technology Press

More Effective C ++ Chinese version, China Power Press

Copyright tive C ++, China Power Press

If Objective C ++ discusses some basic concepts and skills in C ++

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.