Compiler Error C2734
Collapse the table of content
Expand the table of content
The document is archived and information here might be outdated

Compiler Error C2734

Error Message

'identifier' : const object must be initialized if not extern

The identifier is declared const but not initialized or extern.

The following sample generates C2734:

// C2734.cpp
const int j;   // C2734
extern const int i;   // OK, declared as extern
© 2016 Microsoft