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;
- char plec;
- void show(){
- cout<< "Twoje imie to....." << imie << endl;
- cout<< "Twoje nazwisko to...." << nazwisko << endl;
- cout<< "Twoj wiek to....." << wiek << endl;
- cout<< "Twoja plec to....." << plec << endl;
- }
- Pracownik (string n, string ln, int a, char s){
- cout << "Kontruktor" << endl;
- imie=n;
- nazwisko=ln;
- wiek=a;
- plec=s;
- show();
- }
- };
- int main()
- {
- Pracownik p1("Kuba", "Kowalski", 34, 'm');
- Pracownik p2();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement