C and C++ are not the same language. In particular, C
consthas nothing to do with C++
I know, that one difference between the
const qualifier in C and the
const qualifier in C++ is its default linkage.
An object declared at namespace scope with
const qualifier in C++ has internal linkage, while in C an object with
const qualifier declared at global scope has external linkage.
- C中的const限定词和C ++中的const限定词有什么区别？
The answers to How does "const" differ in C and C++? do not point an exact difference between them the const qualifier in both languages.