Skip to content

extern

C和C++都有keyword extern ,下面看看cppreference中总结的C++中它的用法:

Usage 章节
static storage duration with external linkage specifier C++\Language-reference\Basic-concept\Object\Lifetime-and-storage-duration
language linkage specification C-and-C++\From-source-code-to-exec\Link\Linkage\Language-linkage
explicit template instantiation declaration 暂时没有学习

extern和linkage密切相关,关于linkage,参见C-and-C++\From-source-code-to-exec\Link\Linkage