reer to global variable using c++ 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
// a.cpp
int x = 5;
// b.cpp
extern int x; // allows b.cpp to access 'x' from a.cpp