c语言程序设计(郑莉第四版)课件8.pptVIP

  • 2
  • 0
  • 约1.35万字
  • 约 61页
  • 2017-05-30 发布于北京
  • 举报
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Complex operator + (const Complex c1, const Complex c2) { return Complex(c1.real + c2.real, c1.imag + c2.imag); } Complex operator - (Complex c1, Complex c2) { return Complex(c1.real - c2.real, c1.imag - c2.imag); } ostream operator (ostream out, const Complex c) { out ( c.real , c.imag ); return out; } * * 静态绑定与动态绑定 绑定 程序自身彼此关联的过程,确定程序中的操作调用与执行该操作的代码间的关系。 静态绑定 绑定过程出现在编译阶段,用对象名或者类名来限定要调用的函数。 动态绑定 绑定过程工作在程序运行时执行,在程序运行时才确定将要调用的函数。 #includeiostream using namespace std; class Poi

文档评论(0)

1亿VIP精品文档

相关文档