官术网_书友最值得收藏!

  • Expert C++
  • Vardan Grigoryan Shunguang Wu
  • 143字
  • 2021-06-24 16:34:04

Summary

In this chapter, we discussed the fundamental concepts of object-oriented programming. We touched on the low-level details of classes and the compiler implementation of the C++ object model. Knowing how to design and implement classes without actually having classes helps a lot in using the classes the right way.

We also discussed the need for inheritance and tried to employ composition instead of inheritance wherever it might be applicable. C++ supports three types of inheritance: public, private, and protected. All of these types have their applications in particular class designs. Finally, we understood the use and power of polymorphism by bringing an example that drastically increases the convenience of the client code.

In the next chapter, we will learn more about templates and template metaprogramming, which we will use as the basis to dive into a new C++20 feature called concepts.

主站蜘蛛池模板: 高淳县| 冀州市| 和林格尔县| 朝阳县| 邓州市| 郁南县| 习水县| 扶风县| 吉首市| 无棣县| 扶余县| 阳朔县| 泗洪县| 镇宁| 文化| 伊宁县| 镇康县| 年辖:市辖区| 科技| 兴国县| 乌兰浩特市| 桦川县| 柳河县| 华坪县| 常宁市| 方山县| 抚松县| 龙泉市| 昭苏县| 黑山县| 临泉县| 常德市| 三台县| 温宿县| 铁岭市| 连云港市| 聊城市| 宾阳县| 镇远县| 客服| 武邑县|