Quote Originally Posted by master5001 View Post
Code:
(*(strMyStruct*)ptr).a = 10;
This could probably be simplified... again because we typicall don't do "(*var).", but "var->", so it should be
Code:
((strMyStruct*)ptr)->a = 10;
Code:
((myStruct *)((int *)p + 56))->fps = 30.0f;
This one is horrible.
Code:
int* pTemp = (int*)p + 56;
((strMyStruct*)pTemp)->fps = 30.0f;
So much easier to read.