complex.h
来自「it can help you use C++ program we」· C头文件 代码 · 共 21 行
H
21 行
#include <iostream.h>
class CComplex
{
public:
CComplex(){ real = 0.0; image = 0.0; }
CComplex(double rv) { real = rv; image = 0.0; }
CComplex(double rv,double iv) { real = rv; image =iv;}
~CComplex() {}
CComplex &operator = (const CComplex&);
CComplex operator + (const CComplex&);
CComplex operator - (const CComplex&);
CComplex &operator ++(); //前缀
CComplex operator ++(int); //后缀
friend ostream& operator<<(ostream& stream, CComplex c);
private:
double real;
double image;
};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?