自增/自减运算符的重载

Video placeholder
Loading...
View Syllabus

Reviews

4.7 (807 ratings)

  • 5 stars
    83.64%
  • 4 stars
    10.90%
  • 3 stars
    3.22%
  • 2 stars
    1.11%
  • 1 star
    1.11%

BB

Jan 26, 2016

Great course to help you get start with C++. Give a lot of details about class. It is good enough thinking that it is a online free course.

XH

Mar 16, 2016

Challenging but highly recommended if you really want to learn something serious about C++.

From the lesson

运算符重载

如果不做特殊处理的话,C++的“+”“-”“*”“/”等运算符只能用于对基本类型的常量或变量进行运算,不能用于对象之间的运算。我们希望对象之间也能用这些运算符进行运算,例如,复数之间是可以进行四则运算的,两个复数对象相加如果直接用“+”运算符完成,那不是很直观和简洁吗?本模块将介绍利用C++提供的“运算符重载”机制,赋予运算符新的功能,就能解决对象之间运算的问题。

Taught By

  • Placeholder

    Jiaying Liu 刘家瑛, Ph.D.

    Associate Professor

  • Placeholder

    郭 炜

    讲师

Explore our Catalog

Join for free and get personalized recommendations, updates and offers.