Advertisement
Five_NT

header.h

Mar 9th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1. #pragma once
  2.  
  3. #include <iostream>
  4. #include <string.h>
  5. #pragma warning(disable:4996)
  6.  
  7. class Complex {
  8. private:
  9.     int *x; // real
  10.     int *y; // imaginar
  11.  
  12. public:
  13.     Complex(); // Constructor
  14.     Complex(int reala);
  15.     Complex(const char* im);
  16.     Complex(const Complex &); // constr de copiere
  17.     Complex(int reala, const char* im);
  18.     ~Complex(); // destructor
  19.  
  20.     int getX() const { return x[0]; }
  21.     int getY() const { return y[0]; }
  22.  
  23.     Complex add(Complex b); // Adunare
  24.     Complex minus(Complex b); // Scadere
  25.     Complex mul(Complex b); // Inmultire
  26.     Complex div(Complex b); // Impartire
  27.  
  28.     void print();
  29. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement