Static is a keyword in C++ used to give special characteristics to an element. Static elements are allocated storage only once in a program lifetime in static storage area. And they have a scope till the program lifetime. Static Keyword can be used with following,
Interesting facts about Static Members Functions in C++
- static member functions do not have this pointer.
- A static member function cannot be virtual
- Member function declarations with the same name and the name parameter-type-list cannot be overloaded if any of them is a static member function declaration.
- static member function can not be declared const, volatile, or const volatile.