What does the extern keyword mean?

后端 未结 3 1783
梦谈多话
梦谈多话 2020-12-07 21:56

What does the extern keyword mean? I\'ve seen that in front of an function declaration like

extern void DoFoo ...
3条回答
  •  失恋的感觉
    2020-12-07 22:56

    extern gives a name external linkage. This means that the object or function is accessible through this name from other translation units in the program. For functions, this is the default linkage in any case so its usage (in this context) is usually redundant.

提交回复
热议问题