Click here to Skip to main content
15,920,110 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Header files #include problem Pin
Bram van Kampen4-Nov-07 11:49
Bram van Kampen4-Nov-07 11:49 
GeneralRe: Header files #include problem Pin
Bram van Kampen4-Nov-07 11:11
Bram van Kampen4-Nov-07 11:11 
GeneralRe: Header files #include problem Pin
Oliver1234-Nov-07 11:33
Oliver1234-Nov-07 11:33 
GeneralRe: Header files #include problem Pin
Bram van Kampen4-Nov-07 12:17
Bram van Kampen4-Nov-07 12:17 
GeneralRe: Header files #include problem Pin
Oliver1235-Nov-07 14:23
Oliver1235-Nov-07 14:23 
Question4 bit datatype? Pin
_NielsB3-Nov-07 8:56
_NielsB3-Nov-07 8:56 
AnswerRe: 4 bit datatype? Pin
David Crow3-Nov-07 11:55
David Crow3-Nov-07 11:55 
GeneralRe: 4 bit datatype? Pin
Bram van Kampen3-Nov-07 13:04
Bram van Kampen3-Nov-07 13:04 
DavidCrow wrote:
Something like:


struct{ char c:4;};


This is indeed a respected method inkeeping with the language. However it also depends on what the four bit data type is to be used for, Is packing on a Four Bit boundary required.If a lot of manipulating code is to be written, or an array of nibbles needs to be addressed, maybe a more transparent way is Masking and Shifting, and a Raft of Macro's to cover it.

e.g.:
#define LO_NIBBLE(x) ((x)&0xFF)
#define HI_NIBBLE(x) (((x)>4))&0xFF)
#define GET_ARR_ITEM(Arr,N) ((((N)&1)==0)?LO_NIBBLE((Arr)[(N)/2]:HI_NIBBLE((Arr)[(N)/2])

And so on ad infinitum

Even further, depending on the importance and complexity of the grander problem to be solved, (and the Time and resources available)one could conceive of a new class, CNibble with an entire gammet of overloaded operators. Come to think of it, why not also a Class CHalfNibble and CBit.

Hope this is of help, Smile | :)
regards


LateNightsInNewry

QuestionChanging resource in a dll Pin
Imtiaz Murtaza3-Nov-07 8:14
Imtiaz Murtaza3-Nov-07 8:14 
AnswerRe: Changing resource in a dll Pin
Peter Weyzen3-Nov-07 18:58
Peter Weyzen3-Nov-07 18:58 
QuestionRemoving the scrollbars from a CFormView derived class Pin
Sternocera3-Nov-07 7:17
Sternocera3-Nov-07 7:17 
AnswerRe: Removing the scrollbars from a CFormView derived class Pin
Nelek4-Nov-07 21:36
protectorNelek4-Nov-07 21:36 
GeneralRe: Removing the scrollbars from a CFormView derived class Pin
Sternocera4-Nov-07 22:05
Sternocera4-Nov-07 22:05 
GeneralRe: Removing the scrollbars from a CFormView derived class Pin
Nelek4-Nov-07 23:48
protectorNelek4-Nov-07 23:48 
Questionflexgrid or any grid VC++ 2003 Pin
Rhymhoont3-Nov-07 6:30
Rhymhoont3-Nov-07 6:30 
QuestionTimer Triggers Pin
thes3cr3t13-Nov-07 4:56
thes3cr3t13-Nov-07 4:56 
AnswerRe: Timer Triggers Pin
Nelek7-Nov-07 4:01
protectorNelek7-Nov-07 4:01 
QuestionCreateProcess returns Error 1450 - No sufficient resources to complete requested service Pin
vipin_nvk3-Nov-07 4:52
vipin_nvk3-Nov-07 4:52 
AnswerRe: CreateProcess returns Error 1450 - No sufficient resources to complete requested service Pin
bob169723-Nov-07 6:40
bob169723-Nov-07 6:40 
Questioncan I Read multi keys from keyboard using Visual C++ 2005? Pin
allooba3-Nov-07 3:11
allooba3-Nov-07 3:11 
QuestionRe: can I Read multi keys from keyboard using Visual C++ 2005? Pin
David Crow3-Nov-07 3:42
David Crow3-Nov-07 3:42 
AnswerRe: can I Read multi keys from keyboard using Visual C++ 2005? Pin
allooba3-Nov-07 7:02
allooba3-Nov-07 7:02 
GeneralRe: can I Read multi keys from keyboard using Visual C++ 2005? Pin
David Crow3-Nov-07 11:53
David Crow3-Nov-07 11:53 
GeneralRe: can I Read multi keys from keyboard using Visual C++ 2005? Pin
allooba3-Nov-07 19:09
allooba3-Nov-07 19:09 
QuestionAsk for permission when modifying Registry Pin
ashishbhatt3-Nov-07 0:42
ashishbhatt3-Nov-07 0:42 

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.