The extern Keyword
The extern keyword is a linkage modifier that has different meanings in different contexts. In C++, when used it the form extern "C", it can be used to declare functions and variables which should have C linkage.
extern is not normally used in function definitions/declarations.
With variables, extern is normally used in-front of a variable declaration to declare that it is defined elsewhere (this will stop the compiler from trying to look for it, and save this for the linker step).
Inline functions have special rules on what the word extern means.
Posted: December 3rd, 2014 at 8:51 am
Last Updated on: August 15th, 2017 at 10:54 am