complex.h
来自「矩阵类 简单的矩阵类的编写」· C头文件 代码 · 共 46 行
H
46 行
// complex.h: interface for the Complex class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_COMPLEX_H__621EF93F_D626_49D7_B0C1_EEA88F0D5090__INCLUDED_)
#define AFX_COMPLEX_H__621EF93F_D626_49D7_B0C1_EEA88F0D5090__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class Complex;
Complex operator --(Complex& x);//前置
Complex operator --(Complex& x, int); //后置
class Complex
{
public:
double GetReal();
double GetImage();
void SetImage(double x);
void SetReal(double x);
Complex(double x = 0, double y = 0);
Complex(Complex &x);
Complex friend operator *(Complex& x, Complex& y);
virtual ~Complex();
// Complex operator +(Complex& op);
Complex operator ++(void);//前置
Complex operator ++(int); //后置
// friend Complex operator -(Complex& x, Complex& y);
// friend Complex operator --(Complex& x);//前置
// friend Complex operator --(Complex& x, int); //后置
int operator !();
int operator ==(Complex op);
//private:
double m_dReal, m_dImage;
};
#endif // !defined(AFX_COMPLEX_H__621EF93F_D626_49D7_B0C1_EEA88F0D5090__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?