Is there an equivalent to a class method in C++?
I know that in Objective-C we can declare a function in the header by + (void)aClassFunction; and we can call it by [myClass aClassFunction]; Is there a way to do this in C++?
Is there an equivalent to a class method in C++? I know that in
Share
Yes, use
static:You can see that you access them via the class name followed by the scope resolution operator,
::, followed by the name of the function.