Javkens

Untitled

Jan 16th, 2016
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. //complex0.h
  2. void val();
  3. friend std::iostream & operator>>(std::iostream & os, Complex0 & c);
  4.  
  5. //coplex0.cpp
  6. void Complex0::val()
  7. {
  8.     cout << "Podaj czesc rzeczywista: ";
  9.     cin >> real;
  10.     cout << endl << "Podaj czesc urojona: ";
  11.     cin >> imag;
  12.     cout << endl;
  13. }
  14.  
  15.  
  16. std::iostream & operator<<(std::iostream & os, Complex0 & c)
  17. {
  18.     c.val();
  19.     return os;
  20. }
Add Comment
Please, Sign In to add comment