First time asking a question here, but I'm really confused by this. This is essentially what I'm trying to do:
- (MyStruct)methodName:(OtherStruct)foo
{
MyStruct bar;
memcpy(&bar, &foo, sizeof(MyStruct));
return bar;
}
My attempts to figure this out have gotten me this info:
- sizeof(bar) == 64
- sizeof(foo) == 80
- sizeof(MyStruct) == 64
- sizeof(OtherStruct) == 80
I get EXC_BAD_ACCESS (code=1, address=0x0). Am I missing something silly?