H
hyling.s1
Would someone please enlighten me as to why each version behaves the
way it does?
char temp[12];
int temp2 = sizeof(char);
QCoreApplication a(argc, argv);
temp[0] = 0xFF;
temp[1] = 0xEE;
if(temp[0] == 0xFF) // returns false but if(temp[0] == (char)0xFF) //
returns true
{
printf("yes");
}
else
{
printf("no");
}
Thanks
Hua-Ying
way it does?
char temp[12];
int temp2 = sizeof(char);
QCoreApplication a(argc, argv);
temp[0] = 0xFF;
temp[1] = 0xEE;
if(temp[0] == 0xFF) // returns false but if(temp[0] == (char)0xFF) //
returns true
{
printf("yes");
}
else
{
printf("no");
}
Thanks
Hua-Ying