Click here to Skip to main content
15,911,139 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Need an Algorithm Pin
toxcct3-Jun-05 0:33
toxcct3-Jun-05 0:33 
GeneralRe: Need an Algorithm Pin
Blake Miller3-Jun-05 4:03
Blake Miller3-Jun-05 4:03 
GeneralRe: Need an Algorithm Pin
toxcct3-Jun-05 4:05
toxcct3-Jun-05 4:05 
GeneralRe: Need an Algorithm Pin
Alton Williams3-Jun-05 4:09
Alton Williams3-Jun-05 4:09 
GeneralRe: Need an Algorithm Pin
Blake Miller3-Jun-05 4:02
Blake Miller3-Jun-05 4:02 
GeneralUsing SetUnhadledExceptionFilter in COM component Pin
Poul Haahr Klemmensen2-Jun-05 23:46
Poul Haahr Klemmensen2-Jun-05 23:46 
GeneralHexadecimal to Binary Pin
mcsherry2-Jun-05 23:20
mcsherry2-Jun-05 23:20 
GeneralRe: Hexadecimal to Binary Pin
RichardS2-Jun-05 23:56
RichardS2-Jun-05 23:56 
Hi Andy,

How do you want to store the binary? So you want a string that reads "0110 1111 1100 1001"? or is it in a 16-bit variable?

As for swapping the bytes, store the bytes in array achOrig, then just bit shift them:

short int w16Bits = (achOrig[0] << 8) | achOrig[1];

Now you will have w16Bits = 6F C9 (in memory)

regards,
Rich




"Programming today is a race between software engineers striving to build bigger and
better idiot-proff programs, and the Universe trying to produce bigger and better idiots.
So far the Universe is winning." -- Rich Cook
GeneralRe: Hexadecimal to Binary Pin
mcsherry3-Jun-05 3:41
mcsherry3-Jun-05 3:41 
GeneralRe: Hexadecimal to Binary Pin
Blake Miller3-Jun-05 4:15
Blake Miller3-Jun-05 4:15 
GeneralSeeking in Large Files Pin
RichardS2-Jun-05 23:00
RichardS2-Jun-05 23:00 
GeneralRe: Seeking in Large Files Pin
Koms Bomb2-Jun-05 23:06
Koms Bomb2-Jun-05 23:06 
GeneralRe: Seeking in Large Files Pin
RichardS2-Jun-05 23:24
RichardS2-Jun-05 23:24 
GeneralRe: Seeking in Large Files Pin
Koms Bomb2-Jun-05 23:36
Koms Bomb2-Jun-05 23:36 
GeneralRe: Seeking in Large Files Pin
RichardS3-Jun-05 3:33
RichardS3-Jun-05 3:33 
GeneralRe: Seeking in Large Files Pin
David Crow3-Jun-05 3:40
David Crow3-Jun-05 3:40 
GeneralRe: Seeking in Large Files Pin
RichardS3-Jun-05 3:54
RichardS3-Jun-05 3:54 
GeneralRe: Seeking in Large Files Pin
Koms Bomb3-Jun-05 4:07
Koms Bomb3-Jun-05 4:07 
GeneralRe: Seeking in Large Files Pin
David Crow3-Jun-05 2:39
David Crow3-Jun-05 2:39 
GeneralRe: Seeking in Large Files Pin
RichardS3-Jun-05 3:36
RichardS3-Jun-05 3:36 
GeneralRe: Seeking in Large Files Pin
Blake Miller3-Jun-05 4:20
Blake Miller3-Jun-05 4:20 
GeneralStreamOut doesn't preserve CFM_LINK settings Pin
P. Gnana Prakash2-Jun-05 22:19
P. Gnana Prakash2-Jun-05 22:19 
QuestionWindows Media Player, GetVolume(), always return -600? Pin
Koms Bomb2-Jun-05 22:09
Koms Bomb2-Jun-05 22:09 
AnswerRe: Windows Media Player, GetVolume(), always return -600? Pin
P-Rex2-Jun-05 22:20
P-Rex2-Jun-05 22:20 
GeneralRe: Windows Media Player, GetVolume(), always return -600? Pin
Koms Bomb2-Jun-05 22:26
Koms Bomb2-Jun-05 22:26 

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.