What's the difference between the inline specifier and the extern keyword when applied to a variable?
The new feature of C++17 'inline variable' vs 'extern' keyword inherited from C
1.3k views Asked by Zeyd At
1
What's the difference between the inline specifier and the extern keyword when applied to a variable?
externsays that the variable definition resides in a translation unit elsewhere.inlinefor global/namespace scope variable means that the definition is provided at the spot. Withoutinlineorconstthere will be multiple symbol definition linker error.