Skip to main content
3 of 4
added 23 characters in body
JimmyB
  • 3.9k
  • 2
  • 20
  • 21

statics are not visible outside of the current compilation unit, or "translation unit". This is not the same as the same file.

Notice that you include the header file into any source file where you may need the variables declared in the header. This inclusion makes (an instance of) the variable visible inside every compilation unit which includes the header file.

JimmyB
  • 3.9k
  • 2
  • 20
  • 21