Original Post
I know it has been mentioned on an other forum already but I didn''t find a good answer on the question.
Does anyone have a good explanation of the #pragma pack(n) directive? VC++ 6.0 only tells it can accept 1,2,4,8,16 as n. But I obviously don''t know what they mean.
I''m using it as follows in my bmp structures and I know it is related to the byteorder: (as can be derived from the hex view of both, an original bmp and a program-made bmp)
Could anyone explain what the values passed to pack() mean?
===========================
UNKNOWN caused an invalid page fault in module unknown at 0000:bff80eb6
: win98 with multiple sclerose
#pragma pack(1)
struct BITMAPFILEHEADER //header of a BMP-file
{
short bfType; //Ident of a BMP-file ''BM''
long bfSize; //size of our file
short bfRes1; //something
short bfRes2; //something else
long bfOffBits; //the offset to the image bits
};
#pragma pack()