Click here to Skip to main content
15,885,366 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionBit Shift and Mask Pin
resolvequestion23-Jul-09 6:29
resolvequestion23-Jul-09 6:29 
AnswerRe: Bit Shift and Mask Pin
Cedric Moonen23-Jul-09 7:40
Cedric Moonen23-Jul-09 7:40 
AnswerRe: Bit Shift and Mask Pin
Iain Clarke, Warrior Programmer23-Jul-09 9:17
Iain Clarke, Warrior Programmer23-Jul-09 9:17 
GeneralRe: Bit Shift and Mask Pin
resolvequestion23-Jul-09 9:59
resolvequestion23-Jul-09 9:59 
GeneralRe: Bit Shift and Mask Pin
Iain Clarke, Warrior Programmer23-Jul-09 20:46
Iain Clarke, Warrior Programmer23-Jul-09 20:46 
GeneralRe: Bit Shift and Mask Pin
CPallini23-Jul-09 10:30
mveCPallini23-Jul-09 10:30 
GeneralRe: Bit Shift and Mask Pin
Iain Clarke, Warrior Programmer23-Jul-09 20:49
Iain Clarke, Warrior Programmer23-Jul-09 20:49 
AnswerRe: Bit Shift and Mask Pin
CPallini23-Jul-09 10:27
mveCPallini23-Jul-09 10:27 
struct PacketHeader ph;
unsigned char firstbit  = (ph.flags & 1);
unsigned char secondbit = ((ph.flags >> 1) & 1);
unsigned char thirdbit  = ((ph.flags >> 2) & 1);
unsigned char fourthbit = ((ph.flags >> 3) & 1);
unsigned char remaining = (ph.flags >> 4);


Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

Questionwhat happens in following code exactly? [modified] Pin
sam_psycho23-Jul-09 5:52
sam_psycho23-Jul-09 5:52 
AnswerRe: what happens in following code exactly? Pin
Code-o-mat23-Jul-09 6:01
Code-o-mat23-Jul-09 6:01 
GeneralRe: what happens in following code exactly? Pin
sam_psycho23-Jul-09 6:11
sam_psycho23-Jul-09 6:11 
AnswerRe: what happens in following code exactly? Pin
Iain Clarke, Warrior Programmer23-Jul-09 9:06
Iain Clarke, Warrior Programmer23-Jul-09 9:06 
AnswerRe: what happens in following code exactly? Pin
Joe Woodbury23-Jul-09 10:44
professionalJoe Woodbury23-Jul-09 10:44 
Question[mfc] restart other process Pin
rahuljin23-Jul-09 5:51
rahuljin23-Jul-09 5:51 
AnswerRe: [mfc] restart other process Pin
ThatsAlok23-Jul-09 6:05
ThatsAlok23-Jul-09 6:05 
GeneralRe: [mfc] restart other process Pin
rahuljin23-Jul-09 7:01
rahuljin23-Jul-09 7:01 
AnswerRe: [mfc] restart other process Pin
Code-o-mat23-Jul-09 6:11
Code-o-mat23-Jul-09 6:11 
GeneralRe: [mfc] restart other process Pin
rahuljin23-Jul-09 6:52
rahuljin23-Jul-09 6:52 
GeneralRe: [mfc] restart other process Pin
Code-o-mat23-Jul-09 7:09
Code-o-mat23-Jul-09 7:09 
AnswerRe: [mfc] restart other process Pin
Rajesh R Subramanian23-Jul-09 7:55
professionalRajesh R Subramanian23-Jul-09 7:55 
GeneralRe: [mfc] restart other process Pin
rahuljin23-Jul-09 8:27
rahuljin23-Jul-09 8:27 
QuestionRe: [mfc] restart other process Pin
Rajesh R Subramanian23-Jul-09 9:53
professionalRajesh R Subramanian23-Jul-09 9:53 
AnswerRe: [mfc] restart other process Pin
rahuljin23-Jul-09 10:09
rahuljin23-Jul-09 10:09 
GeneralRe: [mfc] restart other process Pin
ThatsAlok23-Jul-09 20:00
ThatsAlok23-Jul-09 20:00 
GeneralRe: [mfc] restart other process [modified] Pin
rahuljin23-Jul-09 21:57
rahuljin23-Jul-09 21:57 

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.