文件名称:cpp2
下载
别用迅雷、360浏览器下载。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
介绍说明--下载内容均来自于网络,请自行研究使用
定义一个复数类Complex,包含2个私有成员double real,imaginary,分别表示复数的实部和虚部。请定义出复数类的构造函数,同时重载以下函数:
重载加法(+)为复数加上对象,作为类的成员函数。
重载减法(-)为复数减去实数,作为类的友元函数。
-Definition of a complex number class Complex, individual and private member includes two double real, imaginary, respectively, the real part and imaginary part. Please define complex class constructor, while overloading the following functions: overloaded Addition (+) plus the object is complex, as the class member functions. overloaded subtraction (-) minus the real number is a complex number, as the class friend function.
重载加法(+)为复数加上对象,作为类的成员函数。
重载减法(-)为复数减去实数,作为类的友元函数。
-Definition of a complex number class Complex, individual and private member includes two double real, imaginary, respectively, the real part and imaginary part. Please define complex class constructor, while overloading the following functions: overloaded Addition (+) plus the object is complex, as the class member functions. overloaded subtraction (-) minus the real number is a complex number, as the class friend function.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
cpp2.cpp