pragma-pack Questions

11

Solved

I was wondering if someone could explain to me what the #pragma pack preprocessor statement does, and more importantly, why one would want to use it. I checked out the MSDN page, which offered som...
Helton asked 23/7, 2010 at 13:12

5

Solved

In C, the compiler will lay out members of a struct in the order in which they're declared, with possible padding bytes inserted between members, or after the last member, to ensure that each membe...
Hilleary asked 19/12, 2011 at 22:28

1

I am porting a code which runs perfectly on Linux to windows visual c++. I have this code in Linux: struct exif_desc { uint16_t tag; uint16_t type; uint32_t length; uint32_t value; } __attribu...
Sprout asked 25/8, 2015 at 16:2

3

Solved

What is the scope of the #pragma pack alignment in Visual C++? The API reference https://msdn.microsoft.com/en-us/library/vstudio/2e70t5y1%28v=vs.120%29.aspx says: pack takes effect at the first...
Blowbyblow asked 24/6, 2015 at 19:5

1

Solved

What does the following statement actually do and what are it's effects? #pragma pack(push,8)
Foreclosure asked 25/10, 2010 at 12:41
1

© 2022 - 2024 — McMap. All rights reserved.