public
Authored by
Marc Bärtschi @marc

asd
Embed
Share
#ifndef COMPLEX_H
#define COMPLEX_H
#include <iostream>
using namespace std;
struct Complex
{
double real;
double imaginary;
Complex();
Complex(double r, double i);
Complex(const Complex &other);
Complex operator=(Complex newVal);
};
std::ostream &operator<<(std::ostream &out, const Complex &c);
std::istream &operator>>(std::istream &in, Complex &c1);
Complex operator+(Complex c1, Complex c2);
Complex operator-(Complex c1, Complex c2);
Complex operator-(Complex input);
Complex operator*(Complex c1, Complex c2);
Complex operator/(Complex c1, Complex c2);
bool operator==(Complex c1, Complex c2);
bool operator!=(Complex c1, Complex c2);
// Write structure declaration/operators forward declarations here
#endif
Please register or sign in to comment