I know that global variables in C sometimes have the extern
keyword. What is an extern
variable? What is the declaration like? What is its scope?
This is related to sharing variables across source files, but how does that work precisely? Where do I use extern
?
转载于:https://stackoverflow.com/questions/1433204/how-do-i-use-extern-to-share-variables-between-source-files