- #36
- 15,498
- 745
Static has many meanings in C and C++.
- A static file-scope variable acts like a global variable except that it is not visible to the linker. The opposite of static is no keyword.
- A static function similarly is not visible to the linker.
- A static function-scope variable has permanent storage and is initialized but once (this use of static is opposite of auto).
- A static member variable is a class variable.
- A static member function can only access static member variables.