C
Christopher Benson-Manica
enum foo {a,b,c,d};
int main()
{
unsigned int bar=reinterpret_cast< unsigned int >( a );
return bar;
}
g++ rejects the code based on the reinterpret_cast, so I presume it is
not legal. Why not? And why should g++ accept the code when
static_cast is used instead (as it does)?
int main()
{
unsigned int bar=reinterpret_cast< unsigned int >( a );
return bar;
}
g++ rejects the code based on the reinterpret_cast, so I presume it is
not legal. Why not? And why should g++ accept the code when
static_cast is used instead (as it does)?