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

📄 12vii.h

📁 C/C++程序设计导论(第二版)》程序源文件
💻 H
字号:
// complex3.h  New and Improved Complex class with construc-
//	tors and overloaded arithmetic operators 

class Complex
{ public :			
	Complex () { };					// default constructor
	Complex (float initreal, float initimag);					// constructor
	void InputC (istream& in);					// input a complex number
	void OutputC (ostream& out);					// output a complex number
	Complex operator+ (Complex x);					// add two complex numbers
	Complex operator- (Complex x);					// sub two complex numbers
	Complex operator* (Complex x);					// mult two complex numbers
  private:  float real, imag;						// private attributes.
};
ostream& operator << (ostream& out, Complex x);
istream& operator >> (istream& in, Complex& x);

⌨️ 快捷键说明

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