daily pastebin goal
53%
SHARE
TWEET

Untitled

a guest Feb 17th, 2019 115 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. class WARTOSC {
  6.     double w;
  7.    
  8.     public:
  9.         WARTOSC (double a = 0) {w = a;}
  10.    
  11.     double zwroc() { //metoda zwracajaca wartosc
  12.         return w;
  13.     }  
  14.    
  15.     virtual void wypisz() { //metoda wypisujaca wartosc
  16.         cout<<w<<endl;
  17.     }
  18.  
  19.     friend istream & operator >> (istream & wejscie, WARTOSC & obj) {
  20.         wejscie>>obj.w;
  21.         return wejscie;
  22.     }
  23.  
  24. };
  25.  
  26.  
  27. int main() {
  28.  
  29.     WARTOSC * x = new WARTOSC();
  30.  
  31.    
  32.     return 0;
  33. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top