F
frank
Do the structure operators '.' and '->' have any possible employment
in constant expressions? I try;
const struct astruct {int x; int y; } as = { 1, 2 };
int aa=as.y;
and Microsoft's compiler tells me;
I would guess these operators would have to refer to a variable, so
they would never be useable in a constant initialiser, but is there
any way of using 'const' keyword or other method whereby they would be
relevant?
in constant expressions? I try;
const struct astruct {int x; int y; } as = { 1, 2 };
int aa=as.y;
and Microsoft's compiler tells me;
zak.c(3) : error C2099: initializer is not a constant
I would guess these operators would have to refer to a variable, so
they would never be useable in a constant initialiser, but is there
any way of using 'const' keyword or other method whereby they would be
relevant?