SHARE
TWEET

Untitled

a guest Mar 26th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //complex.h
  2. #pragma once
  3. class complex {
  4. private:
  5.     double real;
  6.     double imaginary;
  7. public:
  8.     complex(double, double);
  9.     double Real() const;
  10.     double Imaginary() const;
  11. };
  12.  
  13.  
  14. //complex.cpp
  15.  
  16. #include "complex.h"
  17. using namespace std;
  18.  
  19. class complex  {
  20.   private:
  21.       double real;
  22.       double imaginary;
  23.   public:
  24.      complex (double r = 0.0, double i = 0.0) :  real(r), imaginary(i) {  }
  25.     double Real () const { return real; }
  26.     double imaginary () const { return imaginary; }
  27. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top