Advertisement
Guest User

Untitled

a guest
Dec 18th, 2014
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class realcl
  5. {
  6.      const int Re;
  7.     double &Im;
  8. public:
  9.     realcl(int r, double i): Re(r), Im(i)
  10.     {
  11.         cout<<Re+Im<<endl;
  12.     }
  13.  
  14. //  realcl(int rr, double ri){Re=rr; Im=ri;Dgt=rr+ri;};
  15.     realcl::realcl();
  16.     realcl::~realcl()
  17.     {
  18.     }
  19. };
  20.  
  21. class Complex
  22. {
  23.     realcl Re,&Im;
  24. public:
  25.     Complex(int cr,double ci):Re(cr,ci){};
  26.     ~Complex();
  27.  
  28. private:
  29.  
  30. };
  31.  
  32.  
  33.  
  34. Complex::~Complex()
  35. {
  36. }
  37.  
  38. void main()
  39. {
  40.     Complex ComDgt(2,0.12);
  41.     system("pause");
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement