Advertisement
Guest User

Untitled

a guest
Jun 25th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.68 KB | None | 0 0
  1. #ifndef COMPLEX
  2. #define COMPLEX
  3. #include <iostream>
  4. #include <math.h>
  5. #include <ostream>
  6. class Complex{
  7.  
  8. private:
  9.   double real;
  10.   double img;
  11.  
  12. public:
  13.   Complex(double real, double img);
  14.   Complex(Complex& otherComplex);
  15.   void setReal(double newReal);
  16.   void setImg(double newImg);
  17.   double getReal();
  18.   double getImg();
  19.   double getBetrag();
  20.   double getWinkel();
  21.   void print();
  22.   Complex operator+(Complex& otherComplex);
  23.   Complex operator-(Complex& otherComplex);
  24.   Complex operator*(Complex& otherComplex);
  25.   Complex operator/(Complex& otherComplex);
  26.   Complex operator!();
  27.   friend std::ostream& operator<<(std::ostream& ostr, const Complex& c);
  28. };
  29. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement