Why wont extern link to a static variable?
Posted
by Jared P
on Stack Overflow
See other posts from Stack Overflow
or by Jared P
Published on 2010-05-15T21:08:58Z
Indexed on
2010/05/15
21:14 UTC
Read the original article
Hit count: 188
Why does extern int n
not compile when n is declared (in a different file) static int n
, but works when declared int n
? (Both of these declarations were at file scope.) Basically, why is int n
in file scope not the same as static int n
in the same scope? Is it only in relation to extern? If so, what about extern am I missing?
© Stack Overflow or respective owner