wish help you to fix your issue Introduction: The standard is inadequate in this area, and there is decades of history of argument on this topic and strict aliasing with no convincing resolution or proposal to fix. This answer reflects my view rather than any imposition of the Standard.
((int *)((char *)&foo + offsetof(foo, b))
((int *)((uintptr_t)&foo.a + sizeof(int)))
accessing data members of nested struct and passing struct to function C++
will be helpful for those in need I would like to code a utility function pointer inside my object that calls a group of other functions in the object. This utility function pointer should be initialized with default functionality, but be capable of override as well. , The problem is that the types mismatch.