>>initialize static member function
>>initializing a functionThese two things doesn't mean anything in C++. You don't initialize a function. You initialize an object ( or a variable, whatever you call them).
Things you can do with functions are:
Declare them
Define them
Call them
Overload them
Templatize them
May be more but I just cannot think of them right now.There is no thing as initializing a function (or member function)
To follow on from this reply if I may, and the original question:
Typically you'd usually use a public static member function as an external interface to your class...
In other words, they can be called from outside of the class and also without there necessarily being an active instance of the class!
For example if you had a singleton object, you'd usually include a public static member function in it's class definition to return a pointer to the one and only instance of the object (which could be stored in the class as a private static object, or as a static object in the class's namespace).
That way if other external classes/objects need to be able to access/use your singleton, they have a means to access it.
Offhand I can't think of any practical examples for protected/private static functions...But I'm sure some of the more experienced programmers on here can expand on this!
Cheers for now,
Jas.