What is the difference between static global and non-static global identifier in C++?

Fahad Siddiqui picture Fahad Siddiqui · Oct 31, 2012 · Viewed 11.5k times · Source

What is the difference between static global and non-static global identifier in C++?

Answer

Alok Save picture Alok Save · Oct 31, 2012

Static limits the scope of the variable to the same translation unit.
A static global variable has internal linkage.
A non-static global variable has external linkage.

Good Read:
What is external linkage and internal linkage?