C++ Programming :: Functions - Discussion
10 / 14
Static member functions
Acan access only static members in the same class
Bhas only one copy ofit exists for all instances of a class.
Ccan access constant members.
Dboth (b) arid (c)
Show Explanation
However static member functions are independent of the objects of class. we can access a static function directly using the scope resolution operator '::'.
A static member function will only have access to static members of the class.
Asked In ::
Static Class members will have only one copy of its will be used by all members of the class no matter how many objects are created.
However static member functions are independent of the objects of class. we can access a static function directly using the scope resolution operator '::'.
A static member function will only have access to static members of the class.
Read Full Answer
Report Error
Please Login First Click Here