Archived

This topic is now archived and is closed to further replies.

BraveZeus

Question about static

Recommended Posts

Ok, I know how to use static member data and static member functions and static variables within a global (non-member) function, but I don''t see what you use a static global function for....could someone please explain this, I looked in MSDN docs (though not for very long I admit) and found nothing but info for static member functions, thanks in advance.

Share this post


Link to post
Share on other sites
Yep, static was one way in C to keep code modular (ie. make a function only visible to that particular file). Generally, if you''re using C++, which it seems like you are, you won''t need to create any of these yourself.

Share this post


Link to post
Share on other sites
It''s still useful in C++ to declare static global functions and data that won''t be used outside the module. It cuts down on exported symbols in the object file generated.

Share this post


Link to post
Share on other sites