Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //complex.h
- #pragma once
- class complex {
- private:
- double real;
- double imaginary;
- public:
- complex(double, double);
- double Real() const;
- double Imaginary() const;
- };
- //complex.cpp
- #include "complex.h"
- using namespace std;
- class complex {
- private:
- double real;
- double imaginary;
- public:
- complex (double r = 0.0, double i = 0.0) : real(r), imaginary(i) { }
- double Real () const { return real; }
- double imaginary () const { return imaginary; }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement