Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma pack(1)
- struct MyStruct
- {
- int a;
- bool b;
- const char* c;
- };
- void test(MyStruct* p)
- {
- MyStruct* s = p;
- s->a = 0x1234;
- s->b = true;
- s->c = "Hello world";
- }
- int main()
- {
- MyStruct s;
- test(&s);
- return s.a;
- }
- struct MyStruct
- {
- int a;
- bool b;
- const char* c;
- };
Add Comment
Please, Sign In to add comment