Facebook
From karolcia, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 176
  1. celsius operator- (const celsius &druga) {
  2.                 celsius tmp;
  3.                 tmp.wartosc = this->wartosc - druga.wartosc;
  4.                 return tmp;
  5.         }
  6.         ostream &  operator<< (ostream & wyjscie) {
  7.                 wyjscie << "Temperatura: " << this->wartosc << endl;
  8.                 return wyjscie;
  9.         }
  10.         istream & operator >> (istream &wejscie) {
  11.                 wejscie >> this->wartosc;
  12.                 return wejscie;
  13.         }
  14.         celsius operator= (const celsius &druga) {
  15.                 celsius tmp;
  16.                 this->wartosc = druga.wartosc;
  17.                 tmp.wartosc = this->wartosc;
  18.                 return tmp;
  19.         }
  20.