Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main()
- {
- {
- cout << "1" << endl;
- Kot koty[2];
- cout << "2" << endl;
- koty[1].jedz();
- koty[1].wyswietl();
- cout << "3" << endl;
- Kot kot3(koty[0]);
- cout << "4" << endl;
- Zwierze* z = &kot3;
- z->wyswietl();
- cout << "5" << endl;
- Zwierze* z2 = new Kot();
- z2->wyswietl();
- z2->jedz();
- delete z2;
- cout << "6" << endl;
- try
- {
- Kot kolejny_kot;
- kolejny_kot.wyswietl();
- }
- catch(string blad)
- {
- cout << blad << endl;
- }
- cout << "koniec" << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement