Zitat Zitat von Felix G
// Bit gesetzt?
if( Variable & (1 << BitNr) )

// Bit nicht gesetzt?
if( !(Variable & (1 << BitNr)) )
Das geht sogar noch schöner:
// Bit gesetzt?
if( bit_is_set(Variable, BitNr) )

// Bit nicht gesetzt?
if( bit_is_clear(Variable, BitNr) )
Ich sehe da jetzt auch eigentlich kein Problem ...

MfG Kjion