To tylko jedna z 2 stron tej notatki. Zaloguj się aby zobaczyć ten dokument.
Zobacz
całą notatkę
Static class members a static class member is shared by all the class objects static members exist even if there are no objects of the class we may access it using the scope operator class ST { static int s; // declaration only int i; public: static int ps; // as above }; int ST::s=0, // definition ST::ps=0; declare within class declaration, define (without the ” static ” keyword) outside of the class define it once libraries: place definitions in *.cpp, place the class declaration in *.h (there is no need or even possibility to use extern ST::s )
... zobacz całą notatkę
Komentarze użytkowników (0)