WV> Neil Heller wrote in a message to Chris Downs:
Sorry for the delay, but my mail system went kabonkers so I haven't
had any fido stuff for at least a week. Then I see WV quoting you
to me.
NH> Are there any times when the function would need to be
NH> called prior to its instantiation as an object?
Prior to instantiation, after instantiation, or during the life
of an object doesn't matter. Static member functions don't have
a 'this' pointer. So they cannot refer to any member data.
NH> For that
NH> matter, can you think of a viable necessity for a static
NH> function?
Wim gave a nice example, but it's not too often that you'll
_have_to_have_ static member functions. A more common use is for
organizing your code. Certain 'utility functions' can be grouped
with a class where it may "make sense". You also would get some
name clashing protection with this vs just making the function
available without the class membership.
---
þ Blue Wave/QWK v2.12 þ
---------------
* Origin: St. Louis Users Group (1:100/4)
|