#pragma pack(push)
#pragma pack(1)
I downloaded a tutorial and it has these lines in the header file.
I will appreciate if you guys can provide me any tutorials or references related to this.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Microsoft’s explanation:
http://msdn.microsoft.com/en-us/library/aa273913(v=vs.60).aspx
IBM’s AIX xlC explanation:
http://publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp?topic=%2Fcom.ibm.xlcpp8a.doc%2Fcompiler%2Fref%2Frnpgpack.htm
Basically, it determines the byte boundaries that will be used when storing a structure or union. The push/pop acts as a way to store and retrieve these settings on a stack.
For future reference, you might save yourself some time by searching for the keywords you’re asking as about on the web. All I did to find this information was search for “pragma pack” at http://www.google.com