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

  • 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.

主站蜘蛛池模板: 文安县| 洛浦县| 肃北| 合江县| 田阳县| 南雄市| 淮滨县| 千阳县| 多伦县| 青神县| 吴堡县| 平潭县| 合山市| 榕江县| 红桥区| 安乡县| 长顺县| 南康市| 宁明县| 银川市| 安泽县| 马山县| 织金县| 大田县| 定远县| 富阳市| 镇平县| 仁寿县| 望城县| 江源县| 芜湖市| 南木林县| 沈丘县| 合作市| 鸡东县| 双辽市| 水城县| 朔州市| 筠连县| 石柱| 五河县|