I\'m reading \"Think in C++\" and it just introduced the extern declaration. For example:
extern
extern int x; extern float y;
I thi
It is useful when you share a variable between a few modules. You define it in one module, and use extern in the others.
For example:
in file1.cpp:
int global_int = 1;
in file2.cpp:
extern int global_int; //in some function cout << "global_int = " << global_int;