2 ms·
> You can't have different translation units interpreting the same struct type declaration differently. Sure you can! // MyHeader.h struct MyStruct
by maccard 10y ago
> You can't have different translation units interpreting the same struct type declaration differently.
Sure you can!
// MyHeader.h
struct MyStruct {
int A;
char b;
int* c;
};
// A.cpp
#include "MyHeader.h"
<...>
// B.cpp
#pragma pack(push, 16)
#include "MyHeader.h"
#pragma pack(pop)
<...>