Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include <math.h>
- #include <iostream>
- class Complex
- {
- private:
- double _real = 0;
- double _img = 0;
- public:
- Complex(double lfReal, double lfImg);
- Complex(const Complex& c);
- void print();
- Complex operator+ (const Complex& c)
- {
- Complex tmp(0, 0);
- tmp.setReal(_real + c._real);
- tmp.setImg(_img + c._img);
- printf("HERE: \n");
- tmp.print();
- return tmp;
- }
- public:
- double getReal();
- double getImg();
- double getAbsValue();
- double getAngle();
- public:
- void setReal(double lfReal);
- void setImg(double lfImg);
- public:
- //std::string _calcOperator;
- };
Add Comment
Please, Sign In to add comment