Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- class Pracownik
- {
- public:
- string imie;
- string nazwisko;
- int wiek;
- string plec;
- Pracownik()
- {
- imie = "Michal";
- nazwisko = "Pilarski";
- wiek = 19;
- plec = "M";
- }
- void metoda()
- {
- cout<<imie<<endl;
- cout<<nazwisko<<endl;
- cout<<wiek<<endl;
- cout<<plec<<endl;
- }
- };
- int main()
- {
- Pracownik().metoda();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement