miteshpandey
December 11th, 2004, 11:30 AM
The following question is asked in regard to the following FAQ (http://www.codeguru.com/forum/showthread.php?t=306399)...
Thank you very much. This may indeed help me.
NOTE: Another thing you have to keep in mind while dealing with structures is that sizeof may report a size different from the actual size of all the elements of the structure. This is due to the structure alignment done by the compiler for optimization. You can work around this by using the #pragma pack(1)...#pragma pack() compiler directive.
I have one question;
If I don't use the #pragma pack(1)...#pragma pack() directive for my structure will something go wrong?
Thank you very much. This may indeed help me.
NOTE: Another thing you have to keep in mind while dealing with structures is that sizeof may report a size different from the actual size of all the elements of the structure. This is due to the structure alignment done by the compiler for optimization. You can work around this by using the #pragma pack(1)...#pragma pack() compiler directive.
I have one question;
If I don't use the #pragma pack(1)...#pragma pack() directive for my structure will something go wrong?