complex.h (Complex numbers header file)

#ifndef COMPLEX_H
#define COMPLEX_H

class Complex
{
	public:
		double r;
		double i;

	Complex(double, double);
	Complex(double );
	Complex();

	Complex add(Complex&);

	Complex operator+ (Complex&);
	Complex operator- (Complex&);
	Complex operator* (Complex&);
	Complex operator/ (Complex&);
	Complex operator/ (double);

	Complex conj();
	double  norm();
	void    print();

};

#endif
CSE 2122 material is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. Source code for this website available at GitHub.