Facebook
From Eratic Porcupine, 5 Years ago, written in C++.
Embed
Download Paste or View Raw
Hits: 206
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. struct point
  6. {
  7.     float x;
  8.     float y;
  9.  
  10.     friend istream &operator>>(istream&, point&);
  11. };
  12.  
  13. istream &operator>>(istream wejscie, point& ex)
  14. {
  15.     wejscie >> ex.x>>ex.y;
  16.   return wejscie;
  17. }
  18.  
  19. int main()
  20. {
  21.     point p;
  22.     p.x=10;
  23.     p.y=11;
  24.     cout<<p.x<<endl<<p.y<<endl;
  25.  
  26.     system("PAUSE");
  27.     return 0;
  28. }
  29.