Advertisement
Guest User

Untitled

a guest
Nov 12th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.72 KB | None | 0 0
  1. #pragma once
  2. #include <iostream>
  3.  
  4. class Complex {
  5.     private:
  6.         double real;
  7.         double imag;
  8.     public:
  9.         Complex& operator+(Complex&);
  10.         Complex& operator-(Complex&);
  11.         Complex& operator*(Complex&);
  12.         Complex& operator*(double);
  13.         Complex& operator~();
  14.         friend std::ostream& operator<<(std::ostream&,const Complex&);
  15.         friend std::istream& operator>>(std::istream&, Complex&);
  16.         friend Complex& operator* (double,const Complex&);
  17.         Complex(double, double);
  18.         ~Complex();
  19.         Complex();
  20.         Complex& add(Complex&);
  21.         Complex& sub(Complex&);
  22.         Complex& mul(Complex&);
  23.         Complex& mul(double);
  24.         Complex& conj();
  25.         double getReal() const;
  26.         double getImag() const;
  27.         void setReal(double);
  28.         void setImag(double);
  29. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement