Created
September 12, 2022 12:26
-
-
Save senpl/3014a49e45a52e065e12904c2d4b546a to your computer and use it in GitHub Desktop.
Obiekty podczas tworzenia i usuwania
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stwórz klasę z konstruktorem i destruktorem. | |
Niech klasa ma globalny licznik ilośc_obiektow. | |
Niech konstruktor ustawia pole name i zwiększy ilosc_obiektow o 1. | |
Niech destruktor ustawia na obiekcie name usuniete a ilosc_obiektow zmniejsza o 1. | |
Niech w programie zostaną utworzone 5 obiektów potem 2 usunięte. | |
Na koniec wypisz ilosc_obiektow na konsole. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment