谁能解释为什么在 C++ 中将函数设为静态使其仅在内部链接。这只是来自平面标准还是一些语言技巧?
问问题
47 次
1 回答
0
static
can be confusing, because it has a few different meanings depending on context. In this context, it means that the variable being defined is visible only in the current translation unit:
int i; // visible in all translation units
static int j; // visible only in the current translation unit
于 2018-11-29T14:29:39.927 回答