文件名称:lab7_1
- 所属分类:
- ActiveX/DCOM
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- 暮*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
设计一个小型的复数类(C++标准库complex提供复数类),这里为了说明重载运算功能而设计,在小型复数类MiniComplex中,数据成员:实部与虚部。函数远远主要是重载进行复数运算的各种操作符。由于各种运算符功能的限制,将输入与输出运算符重载为友元函数,使得复数的输入与输出更加方便快捷,成员函数重载+,—,*,和/运算符来进行复数的加法、减法、乘法、和除法运算,重载逻辑运算符= =进行复数的相等比较。-Design of a small category of plural (C++ Standard library complex to provide the plural category), here to illustrate the design features heavy-duty computing, in a small complex MiniComplex category, the data members: the real part and imaginary part. Function is far from heavy-duty computing to a variety of complex operator. Operator function of a variety of constraints, will be input and output overloaded operator functions for the Friends of yuan, making the plural of the input and output faster and more convenient, a member of Function Overloading 2B !,-,*, and/operator to carry out the plural of the adder , subtraction, multiplication, and division operations, overloaded logical operator = = for the plural of the same comparison.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
lab7_1.cpp