cpp global code example Example: c++ global variable // a.cpp int x = 5; // b.cpp extern int x; // allows b.cpp to access 'x' from a.cpp