Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Gówno.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- #include <iostream>
- using namespace std;
- class Data
- {
- public:
- Data();
- ~Data();
- friend istream & operator>> (istream & we, Data & klasa)
- {
- cout << "Podaj dzien: ";
- we >> klasa.dzien;
- cout << "Podaj miesiac: ";
- we >> klasa.miesiac;
- return we;
- }
- void Wyswietl()
- {
- cout << this->dzien << '.' << this->miesiac << '.' << this->rok;
- }
- private:
- int dzien;
- int miesiac;
- const int rok;
- };
- Data::Data()
- : rok(2000)
- , dzien(1)
- , miesiac(1)
- {
- }
- Data::~Data()
- {
- }
- int main()
- {
- Data dupa;
- cin >> dupa;
- dupa.Wyswietl();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement