⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 complex.h

📁 这是编程之道C-C++中的源代码,很简练,可以用于相关教学和重新熟悉C-C++时使用
💻 H
字号:
#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -