Effective C + + study notes (part Six:item 32-40)

Source: Internet
Author: User



Recently, Effectvie C + + carefully read the side, very amazing the power and charm of C + +. Recently will be the recent reading experience and reading notes in this, must find use, if the summary of what is wrong, welcome criticism:

Now only the frames are listed, and the most recent will be filled as soon as complete:

Part 6th: Inheritance and object-oriented design


Object-oriented languages have three main features: inheritance, encapsulation, and polymorphism. Thinking back that year, each school recruit written test time will have, but can even these six words connotation of people, no longer the majority. This section summarizes, in-depth explanation of one of the three major features----inheritance. This section spends a lot of time, also feel very interesting. Especially for a certain article to write a specific program to realize, understand its why, is undoubtedly a kind of enjoyment!


Clause 32: Determine your public inheritance mold out is-a relationship
Article 33: Avoid hiding the inherited name
Article 34: Differentiating between interface inheritance and implementation inheritance
Article 35: Other options to consider the virtual function unexpectedly
Article 36: Never redefine inherited non-virtual functions
Article 37: Never redefine inherited default parameter values
Article 38: Through composite mold hu has-a or "according to something to achieve"
Clause 39: Use private inheritance wisely and prudently
Article 40: Use multiple inheritance wisely and prudently

Note: Because there are many links between the terms, all the provisions are not suitable for separate pull out, this will be combined with other provisions of the record, there is no understanding of the place, welcome to exchange;

Effective C + + study notes (part Six:item 32-40)

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.