Don't like ads? PRO users don't see any ads ;-)
Guest

asdasdfmb

By: a guest on May 7th, 2012  |  syntax: C++  |  size: 0.64 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. ostream& operator<<(ostream& out,SAMOLOT& s)
  2. {
  3.     out<<s.DO_dane_samo.wez_dlu()<<" "<<s.DO_dane_samo.wez_naz()<<" "<<s.DO_dane_samo.wez_rok()<<" "<<s.BW_bag_samo->wez()<<" "<<s.W_masa<<endl;
  4.     return out;
  5. }
  6. //==========================================
  7. istream& operator>>(istream& in, SAMOLOT& s)
  8. {
  9.  
  10.     in>>s.DO_dane_samo>>*(s.BW_bag_samo)>>s.W_masa;
  11.  
  12.     return in;
  13. }
  14. //==========================================
  15. void SAMOLOT::zapisz(int odkad, fstream& f)
  16. {
  17.     f.seekp(odkad, ios::beg);
  18.     f<<this;
  19. }
  20. void SAMOLOT::wczytaj(int odkad, fstream& f)
  21. {
  22.     f.seekg(odkad, ios::beg);
  23.     f>>DO_dane_samo>>*(BW_bag_samo)>>W_masa;
  24. }