I understand why this won't link:
extern bool g_WinGame;
...
g_WinGame=true;
But why does this compile and link?
extern bool g_WinGame=false;
...
g_WinGame=true;
I'm using MSVC 2010
[edit] all is explained HERE
extern bool g_WinGame;
is a declaration.
extern bool g_WinGame=false;
is a definition. Here extern
is redundant but legal.