Static Member Functions in C++

Like static member variable, we can also have static member functions. A member function that is declared static just place a static keyword before the function header. Syntax: Characteristics of Static Member function: Static member functions are associated with a class, not with any object. They can be invoked using class name, not object. They can access only static members of the class. They cannot be virtual. They cannot be declared as constant or volatile. A static member function can be called, even when a class is not instantiated.   …

Read More