Click here to Skip to main content
16,011,870 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Storing 2 longs in a single variable Pin
Gilfrog1-Oct-02 7:02
Gilfrog1-Oct-02 7:02 
GeneralRe: Storing 2 longs in a single variable Pin
Chris Losinger1-Oct-02 10:56
professionalChris Losinger1-Oct-02 10:56 
GeneralRe: Storing 2 longs in a single variable Pin
Tomasz Sowinski1-Oct-02 6:57
Tomasz Sowinski1-Oct-02 6:57 
GeneralRe: Storing 2 longs in a single variable Pin
Ryan B.1-Oct-02 7:52
Ryan B.1-Oct-02 7:52 
GeneralRe: Storing 2 longs in a single variable Pin
Anonymous1-Oct-02 8:26
Anonymous1-Oct-02 8:26 
GeneralRe: Storing 2 longs in a single variable Pin
Chris Richardson1-Oct-02 8:33
Chris Richardson1-Oct-02 8:33 
GeneralRe: Storing 2 longs in a single variable Pin
Scott H. Settlemier1-Oct-02 9:19
Scott H. Settlemier1-Oct-02 9:19 
GeneralRe: Storing 2 longs in a single variable Pin
Chris Richardson1-Oct-02 9:22
Chris Richardson1-Oct-02 9:22 
Good call on the packing. I forgot about that.


Scott H. Settlemier wrote:
P.S. Is there a way to get a compile time
assertion that sizeof(long)==4?


Yeah, in winnt.h, there's a macro called C_ASSERT. Here's it's definition, and the comment that describes it:

//
// C_ASSERT() can be used to perform many compile-time assertions:
//            type sizes, field offsets, etc.
//
// An assertion failure results in error C2118: negative subscript.
//

#define C_ASSERT(e) typedef char __C_ASSERT__[(e)?1:-1]


Chris Richardson
GeneralRe: Storing 2 longs in a single variable Pin
Scott H. Settlemier1-Oct-02 9:38
Scott H. Settlemier1-Oct-02 9:38 
GeneralRe: Storing 2 longs in a single variable Pin
Gilfrog1-Oct-02 10:00
Gilfrog1-Oct-02 10:00 
GeneralRe: Storing 2 longs in a single variable Pin
PJ Arends1-Oct-02 10:24
professionalPJ Arends1-Oct-02 10:24 
GeneralRe: Storing 2 longs in a single variable Pin
Chris Richardson1-Oct-02 10:32
Chris Richardson1-Oct-02 10:32 
GeneralDataStorage / Modification Project Pin
Anonymous1-Oct-02 6:20
Anonymous1-Oct-02 6:20 
GeneralVS6 and VS7(.NET) Pin
ns1-Oct-02 6:17
ns1-Oct-02 6:17 
GeneralRe: VS6 and VS7(.NET) Pin
Jeremy Falcon1-Oct-02 6:55
professionalJeremy Falcon1-Oct-02 6:55 
GeneralRe: VS6 and VS7(.NET) Pin
ns1-Oct-02 6:58
ns1-Oct-02 6:58 
GeneralRe: VS6 and VS7(.NET) Pin
Mariusz Popiolek1-Oct-02 7:01
sussMariusz Popiolek1-Oct-02 7:01 
GeneralRe: VS6 and VS7(.NET) Pin
ns1-Oct-02 7:00
ns1-Oct-02 7:00 
GeneralRe: VS6 and VS7(.NET) Pin
Mariusz Popiolek1-Oct-02 7:28
sussMariusz Popiolek1-Oct-02 7:28 
GeneralRe: VS6 and VS7(.NET) Pin
ns1-Oct-02 7:28
ns1-Oct-02 7:28 
GeneralExporting & using static public data members between dlls Pin
mabotta1-Oct-02 6:14
mabotta1-Oct-02 6:14 
GeneralRe: Exporting & using static public data members between dlls Pin
Tomasz Sowinski1-Oct-02 6:27
Tomasz Sowinski1-Oct-02 6:27 
GeneralRe: Exporting & using static public data members between dlls Pin
mabotta1-Oct-02 7:53
mabotta1-Oct-02 7:53 
GeneralAnother checkbox question.... Pin
ns1-Oct-02 5:59
ns1-Oct-02 5:59 
GeneralRe: Another checkbox question.... Pin
Tomasz Sowinski1-Oct-02 6:02
Tomasz Sowinski1-Oct-02 6:02 

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.