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-30 12:07

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


actually, x&(1<<n) if you just want to use it as a condition, and otherwise (x>>n)&1.

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