Home > Software engineering >  About BYTE value judgment
About BYTE value judgment

Time:04-10

, could you please tell me: BYTE A, [2]. How to compare BYTE [0], BYTE [1] values are equal,
At present, I use two methods:
If (BYTE [0]==BYTE [1])
{
//the judgment error
}

Cstrings str1 str2;
Str1. The Format (_T (" % 02 x "), BYTE [0]).
Str2. The Format (_T (" % 02 x "), BYTE [1]).
If (str1.Com pare said (str2)==0)
{
//the judgment error
}

Above, two methods of processing the judgment is wrong,
Excuse me, how to accurately judge the BYTE A [2]; How to compare BYTE [0], BYTE [1] values are equal,

CodePudding user response:

If (A [0]==A [1])
{
}


CodePudding user response:

reference 1st floor zgl7903 response:
if (A [0]==A [1])
{
}

Sorry, this method tried, but the result of judgment was wrong!
  • Related