Advertisement
Guest User

header

a guest
May 25th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1. #pragma once
  2. #include <iostream>
  3.  
  4. class Complex {
  5.     double re;
  6.     double im;
  7.  
  8. public:
  9.     Complex(double real_part, double imag_part);
  10.     ~Complex();
  11.  
  12.     Complex operator+(const Complex& rhs);         
  13.     Complex operator*(const Complex& rhs);
  14.     Complex operator*(const int rhs);
  15.     Complex operator*(const double rhs);
  16.     Complex& operator+=(const Complex& c1);
  17.  
  18.     friend std::ostream& operator<<(std::ostream& os, const Complex& rhs);
  19.     std::ostream& operator<<(std::ostream& os);
  20.     // +=
  21.     // (int/double/complex)*(int/double/complex)
  22. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement