complex.h

来自「面向软件工程的Visual C++网络程序开发」· C头文件 代码 · 共 24 行

H
24
字号
#ifndef COMPLEX_H
#define COMPLEX_H

class AFX_EXT_CLASS CComplex {
public:
	double re;
	double im;
public:

	CComplex(double _re = 0.0, double _im = 0.0){
		re = _re;
		im = _im;
	}
	CComplex operator=(const CComplex& a);
	CComplex operator+(const CComplex& a);
	CComplex operator-(const CComplex& a);
	CComplex operator*(const CComplex& a);
	CComplex operator/(double dNum);
	~CComplex();
	double Mod();
};


#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?