Thursday 14 May 2015

Some facts about static member functions in C++

Like static member variable, we can also have static member functions. A member function that is declared static has the following properties:
  1. A static function can have access to only other static members (functions or variables) declared in the same class.
  2. A static member function can be called using the class name (instead of its objects) as follows:
                   class-name  : :  function-name;

No comments:

Post a Comment