Use of static in C++

Dependencies on static variables in different translation units are, in general, a code smell and should be a reason for refactoring. http://www.modernescpp.com/index.php/c-20-static-initialization-order-fiasco

If an object or function inside such a translation unit has internal linkage, then that specific symbol is only visible to the linker within that translation unit. If an object or function has external linkage, the linker can also see it when processing other translation units. The static keyword, when used in the global namespace, forces a symbol to have internal linkage. The extern keyword results in a symbol having external linkage.

Anonymous namepsaces

Use to declare many things with internal linkage.

namespace {
int a = 0;
int b = 0;
int c = 0;
}

See linkage.