Use the #pragma pack
directive for that:
#pragma pack(push, 1)
struct foo {
// etc..
};
#pragma pack(pop)
More Related Contents:
- I upgraded C++ projects from Visual Studio 2010 to 2015 still its showing Visual Studio (2010)
- Setup OpenCV-2.3 for Visual Studio 2010
- How to build Qt for Visual Studio 2010
- Mixing debug and release library/binary – bad practice?
- How to avoid precompiled headers
- M_PI works with math.h but not with cmath in Visual Studio
- Visual Studio 2010 not autolinking static libraries from projects that are dependencies as it should be supposed to
- How to set breakpoint at the very beginning of program execution
- in Visual Studio 2010 or 2008 [duplicate]
- srand(time(NULL)) generating similar results [duplicate]
- Visual Studio 2010’s strange “warning LNK4042”
- How to get a list of video capture devices (web cameras) on windows? (C++)
- Static library debug symbols
- Using Visual Studio project properties effectively for multiple projects and configurations
- Differences between running an executable with Visual Studio debugger vs without debugger
- Why can’t Visual Studio find my DLL? [duplicate]
- What is the difference between “Include Directories” and “Additional Include Directories”
- Non-const reference bound to temporary, Visual Studio bug?
- Remove secure warnings (_CRT_SECURE_NO_WARNINGS) from projects by default in Visual Studio
- “The system cannot find the file specified” when running C++ program
- visual c++: #include files from other projects in the same solution
- Is there a format code shortcut for Visual Studio?
- error C2065: ‘cout’ : undeclared identifier
- How to programmatically include a file in my project?
- VS2010 – How to automatically stop compile on first compile error
- using static libraries instead of dynamic libraries in opencv
- Aligning static string literals
- Visual Studio debugger error: Unable to start program Specified file cannot be found
- Should std::unique_ptr be permitted
- VS: unexpected optimization behavior with _BitScanReverse64 intrinsic