Thinking in C ++ Reading Notes (1)

Source: Internet
Author: User

I have long wanted to have time to calm down and read Bruce Eckel's thinking in C ++ book. The book of the electronic version lie on the hard drive of my original host, when I graduated, I had no time to sweep her out, so I gave her a dowry. When I went to csdn today, I suddenly found that the familiar word appeared in my sight. I thought it was not busy during this time, so I took her down again, I hope that I can find a happy one out of my thoughts.

After decompression, I can't wait to read the first chapter-Introduction to objects. Here I review my understanding of class, objects, and OOP (object-oriented programming, it also inspired me to deepen my understanding of those concepts. Of course, it is impossible for us to understand the important concepts of encapsulation, inheritance, and polymorphism by reading these books. It needs to be realized in practice.

Class describes a group of objects with the same features and behaviors, including data elements and methods/functions that operate on the data, the data element is a set of data types that describe the machine storage unit, such as int and Char. It describes the basic features of the object, and the method or function is to operate on the data, is the behavior of object features.

Without inheritance, there is no polymorphism, and encapsulation can be the greatest embodiment in inheritance. Encapsulation includes not only data, but also some methods for operating data. Inheritance represents the similarity between the basic type and the inheritance type. polymorphism is a delayed Association, is implemented using virtual functions.

I soon completed the first chapter and found that I did not understand it at all, not just cloud. In particular, the methodology is virtual.

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.