c - extern 关键字是什么意思?

extern 关键字是什么意思?我在像

这样的函数声明之前已经看到了
extern void DoFoo ...

最佳答案

extern 给出了一个名称​​外部链接。这意味着对象或函数可以通过该名称从程序中的其他翻译单元访问。对于函数,这是任何情况下的默认链接,因此它的使用(在此上下文中)通常是多余的。

https://stackoverflow.com/questions/2753962/

相关文章:

objective-c - 选择具有受支持架构的目标以便在此设备上运行

objective-c - ARC时代的属性(property)与ivar

objective-c - UIScrollView contentSize 不起作用

iphone - 如何使用 NSLog(@"Inside of the iPhone Simulat

iphone - 如何创建自定义键盘

ios - iOS 10 中的错误 : Unable to copy asset informati

ios - UICollectionView:如何检测滚动何时停止

objective-c - 100% 不透明度 UILabel 超过 50% 不透明度背景(UIVi

ios - 更改 UITabBar 高度

ios - 在 iOS 上检测飞行模式