Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

In C++, a static member function is a member function of a class that belongs to the class itself, rather than to any particular instance of the class. Static member functions are not associated with any object of the class and can be called using the class name, without needing an object of the class.

Here's an example of a static member function:

...