Advertisement

Question about static

Started by March 30, 2000 11:56 PM
2 comments, last by BraveZeus 24 years, 8 months ago
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.
Chris
I think it means the function is only available in the file it is declared and cannot be extern..
Advertisement
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.
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.

This topic is closed to new replies.

Advertisement