C
cybernerdsx2
Hi,
I have a program that check for the hex value that passes in from the
command line.
Let say user type in c:\demo.exe 3c
and in the program, I #define SOME_CMD 0x3c.
So how can I convert the argv[1] to unsgined char so that I can compare
it like this:
if ( ucCMD == SOME_CMD )
{
//do something
}
ucCMD is declared as unsigned char.
I have a program that check for the hex value that passes in from the
command line.
Let say user type in c:\demo.exe 3c
and in the program, I #define SOME_CMD 0x3c.
So how can I convert the argv[1] to unsgined char so that I can compare
it like this:
if ( ucCMD == SOME_CMD )
{
//do something
}
ucCMD is declared as unsigned char.