Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

How Do I...

Name: Anonymous 2008-08-29 13:31

...access individual bits in a byte in C++?

Name: Anonymous 2008-08-29 16:50

>>8
WTF DUDE. thats just too much.

set nth bit:
x |= 1<<n;

unset nth bit:
x &= ~(1<<n);

get nth bit:
(x&(1<<n))>>n;

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List