J
JKop
union SignedChoice{
long with_sign;
unsigned long without_sign;
};
int main()
{
SignedChoice data;
data.with_sign = -1;
//Right now, does the C++ Standard guarantee that
//data.without_sign == MAX_ULONGINT?
//Similarly:
data.without_sign = MAX_ULONGINT;
//Is data.with_sign now definitely == -1?
}
Is there any other interesting facts yous can give me?
-JKop
long with_sign;
unsigned long without_sign;
};
int main()
{
SignedChoice data;
data.with_sign = -1;
//Right now, does the C++ Standard guarantee that
//data.without_sign == MAX_ULONGINT?
//Similarly:
data.without_sign = MAX_ULONGINT;
//Is data.with_sign now definitely == -1?
}
Is there any other interesting facts yous can give me?
-JKop