Lecture 4 - Slide 25 : 40 |
Static class members are related to the class as such
Static class members in C++ are similiar to static variables and methods in Java and C#
![]() | A variant of class Point with static members. |
![]() | Implementation of class Point. |
![]() | A client of class Point. |
![]() | Program output. |
Initialization of non-local static objects is problematic in general (in particular initialization order).
Therefore we explore an alternative.
![]() | A variant of class Point with static member function for the defaultPoint. |
![]() | Implementation of class Point. |
![]() | A client of class Point. |