Poznámka:
Přístup k této stránce vyžaduje autorizaci. Můžete se zkusit přihlásit nebo změnit adresáře.
Přístup k této stránce vyžaduje autorizaci. Můžete zkusit změnit adresáře.
'identifier' : 'selectany' lze použít pouze u datových položek s externím propojením.
Poznámky
Atribut selectany lze použít pouze u externě viditelných a globálních datových položek.
Example
Následující příklad generuje C2496:
// C2496.cpp
// compile with: /c
__declspec(selectany) int x1 = 1;
const __declspec(selectany) int x2 = 2; // C2496
static __declspec(selectany) int x6 = 6; // C2496
extern const __declspec(selectany) int x3 = 3;
__declspec(selectany) int x4;
// dynamic initialization of x5
int f();
__declspec(selectany) int x5 = f();
extern const int x7;
// OK - redeclaration of x7 that is extern
const __declspec(selectany) int x7 = 7;