Click here to Skip to main content
15,900,472 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: plzzz Hellppp meeeee exercise for tomorroww Pin
ThatsAlok4-Nov-07 18:54
ThatsAlok4-Nov-07 18:54 
QuestionSMTP mail server Pin
bigdenny2004-Nov-07 1:04
bigdenny2004-Nov-07 1:04 
Questionwhich way is more efficient to check bit value Pin
George_George4-Nov-07 1:02
George_George4-Nov-07 1:02 
AnswerRe: which way is more efficient to check bit value Pin
David Crow4-Nov-07 2:48
David Crow4-Nov-07 2:48 
GeneralRe: which way is more efficient to check bit value Pin
George_George4-Nov-07 18:15
George_George4-Nov-07 18:15 
AnswerRe: which way is more efficient to check bit value Pin
Chris Losinger4-Nov-07 5:47
professionalChris Losinger4-Nov-07 5:47 
GeneralRe: which way is more efficient to check bit value Pin
George_George4-Nov-07 18:26
George_George4-Nov-07 18:26 
GeneralRe: which way is more efficient to check bit value Pin
Chris Losinger5-Nov-07 0:58
professionalChris Losinger5-Nov-07 0:58 
binary 0 = 00000000
binary 1 = 00000001 : first bit set is bit 0
binary 2 = 00000010 : first bit set is bit 1
binary 3 = 00000011 : first bit set is bit 1
binary 4 = 00000100 : first bit set is bit 2
binary 5 = 00000101
binary 6 = 00000110
binary 7 = 00000111
binary 8 = 00001000 : first bit set is bit 3
binary 9 = 00001001 : first bit set is bit 3
binary 10= 00001010 : first bit set is bit 3

etc.,

up to 255 = 11111111 : first bit set is bit 7

so, look_up_table is an array of values that track the first bit set for each value a BYTE can hold.

if you want to know the first bit set in 10, for example:

int first_bit_set = look_up_table[10];

that gives you...3


GeneralRe: which way is more efficient to check bit value Pin
George_George5-Nov-07 1:13
George_George5-Nov-07 1:13 
GeneralRe: which way is more efficient to check bit value Pin
David Crow5-Nov-07 3:43
David Crow5-Nov-07 3:43 
GeneralRe: which way is more efficient to check bit value Pin
George_George5-Nov-07 18:41
George_George5-Nov-07 18:41 
QuestionCreate a file, containing folder contents Pin
TheRamon3-Nov-07 23:38
TheRamon3-Nov-07 23:38 
AnswerRe: Create a file, containing folder contents Pin
Nelek4-Nov-07 21:51
protectorNelek4-Nov-07 21:51 
Questionlocal system account Pin
ginjikun3-Nov-07 22:59
ginjikun3-Nov-07 22:59 
QuestionNetwork Monitor Pin
AhmedOsamaMoh3-Nov-07 21:46
AhmedOsamaMoh3-Nov-07 21:46 
QuestionExport string from Dll Pin
Max++3-Nov-07 21:02
Max++3-Nov-07 21:02 
QuestionTracking a mouse movement inside a dialog without Tab controls Pin
Larry Mills Sr3-Nov-07 15:39
Larry Mills Sr3-Nov-07 15:39 
AnswerRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Nelek4-Nov-07 21:41
protectorNelek4-Nov-07 21:41 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Larry Mills Sr5-Nov-07 5:57
Larry Mills Sr5-Nov-07 5:57 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls [modified] Pin
Nelek5-Nov-07 20:30
protectorNelek5-Nov-07 20:30 
AnswerRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Mark Salsbery5-Nov-07 5:54
Mark Salsbery5-Nov-07 5:54 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Larry Mills Sr5-Nov-07 6:03
Larry Mills Sr5-Nov-07 6:03 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Mark Salsbery5-Nov-07 6:34
Mark Salsbery5-Nov-07 6:34 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls [modified] Pin
Larry Mills Sr5-Nov-07 9:10
Larry Mills Sr5-Nov-07 9:10 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Mark Salsbery5-Nov-07 10:48
Mark Salsbery5-Nov-07 10:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.