samedi 17 juin 2017

C++ Check if half char is equal to something

If I have a variable like this

int A = 0x00203450;

how would I check if the 3 value is set? So I am checking if the 3 is right here

0x0020 -> 3 <- 450

I have tried this

if((A & 0x00003000) == 0x00003000)
{
    _sys_print("the 3 value is set")
}

And a few other things, none seem to work. Any suggestions?

Aucun commentaire:

Enregistrer un commentaire