Quick Primer for some c\c++ books _c languages

Source: Internet
Author: User
Tags readable

People often ask me what C + + and programming book recommendations, today for you to share a few

First Note: If you plan to learn C + +, be sure to learn the latest version of C + + 2011. This version of C + + removes many of the pain that comes with the power of C + +. In addition, there is no need to worry about C + + 2014 books, most compilers have started to support it.

Learning programming

Learning programming includes several important aspects:

    • Understand the grammar of a language
    • Know which features can be used and when to use them
    • Write readable code: The compiler is understandable, but can the next person read it?
    • In a higher level of design well structured program

In order to learn a language, we usually can find the book called "X Language Programming". This also forms a unspoken rule: when you create a serious language, you need to write such a book. Learning a language is a bit like learning a composition, but that doesn't mean you can suddenly become a famous prose writer!

For C + +, here are two related books:

    • "C Programming Language" (Brian W. Kernighan, Denis M. Ritchie, tcpl). This book is not about C + +, but all C-related things are related to C + +. For example, the examples included with this book can be seen as examples of C + +, but not real C, because C + + is more stringent than C compiler requirements. But most well-written C programs can be compiled in C + +, Tcpl is a small book, and is known as the best in X language programming books. Every page of the book is full of wisdom.
    • "C + + programming language" (Bjarne Stroustrup), an outstanding book, each page of the book is also full of wisdom. This book has 1400 pages. Verity Stob A lively comment on the book. In Tcpl, we read that "C is not a big language, so there is no need for a lengthy book to explain", but there are 1400 pages of C + + books. Although the book is difficult to read on a page (though, I have read almost every page of the book), I suggest everyone hold one. It explains every aspect of C + + and is very well explained. With this book as a reference to C + +, your programming career will benefit a lot.

I need to make it clear that"C programming Language" is not an introductory book to learn C + +, this book is used to guide you to learn, at the same time, "C programming language" also extracts the "a Tour of C + +" chapter.

C + + is not only a language, but also refers to a library of functions. In the "C + + programming language" also explained the C + + standard library, in order to fully understand the C + + standard library, I recommend:

    • The C + + standard library: self-study tutorials and reference manuals (Nikolai josuttis), like the C + + programming language, is also a voluminous book. But this book covers every aspect of the C + + standard library (also known as the C + + Standard Template Library), and the second edition covers the c++2011 standard.

If you have previously engaged in high-level languages such as Python,perl or java,c and C + + may be intimidating. Unlike other languages, C + + is very close to hardware. This also has the advantage of being able to take advantage of hardware advantages, but also allows you to face realistic details. Simon Tatham (as Putty's developer and author of the missing code smell), although he now uses C to develop a very good document: "The Descent to C", which will reduce your learning difficulties, and even experienced C developers may benefit one or two.

If you read the above three books and links, you can already master C + +, and use the C + + standard library. However, you have not yet learned how to use and when to use C + + features. C + + as a powerful language, there is a saying: "Use C, you make mistakes may hit your own feet, and use C + +, you make mistakes may cause your whole leg is wasted", this said is true.

In addition, the powerful thing about C + + is that you can continue to use the way you used to develop your language. " I can write Fortran code in any language ." But it's not good for you to be a better developer.

With good C + +

There are also three books, the authors of which are Scott Meyers, which will greatly simplify the life of a person determined to develop C + +:

1, effective C + +--listed some common mistakes, useful features and programming needs to pay attention to matters. Recently updated in 2005.
2, more effective C + +-same as above, but more, it is also worth reading.
3, effective STL "-Last updated in 2001, and" effective C + + ", but focus on the C + + standard library.
If you only want to read one of these, choose effective C + +, if you want to choose two, and then choose the effective STL.

Note that Scott is preparing a new book that comprehensively covers the new c++2014 standard (this can be seen as an improvement on the c++2011 standard, and most compilers already support c++2014). Once the book is published, you should buy it at the first time, and the preview section of the book looks pretty good.

Update: Many readers have recommended Stanley Lippman's C + + Primer, I do not understand the book, but it updated the c++2011 standard and received a lot of praise, please tell me your point of view.

Write good Code

The following books discuss the style of the code, and if you write code, they are actually more extensive. Books that instruct you on how to write readable code are:

1, "Programming Practice," (Brian W. Kernighan, Rob Pike, Tpop), this is not a C + + book, but a lot of talk about how to organize the code, when to optimize the code, when not to do optimization, if debugging and how to write code to avoid debugging and so on, I think every development organization should have such a book.
2, "Linux Kernel Code Specification" (Linus Torvalds), this is not a book about C + +, but in the 4th section of "Naming", section sixth "functions" and the eighth section of the notes, we can learn a lot.
Every programmer who wants to improve its code is better off reading every page of the program design practice.

Designing large-scale code

I only know a book that tells this, and some of my thoughts are shaped by it.

"Large-scale C + + Software Design" (John Lakos), although in some years of the book, some of the recommendations are used to guide people who started the process for lack of storage and low performance machines, From this book I learned how to disassemble a complex system into a number of meaningful modules. Of particular note is the handling of dependency code in loops. The extra detail makes your code almost impossible to test, because each module relies heavily on other modules.
These are the books I recommend for you, are my personal views, I hope to learn C + + help you, I wish to learn C + + children's shoes progress!

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.