On Fri, 14 Nov 2003 05:15:50 +0000, Allen wrote:
Will my pointer survive this conversion?
MyType_tag MyType;
MyType_tag* pMyPntr = &MyType;
int iUglyTempStorage = (int)pMyPntr;
MyType_tag* pMyOtherPntr = (MyType_tag*)iUglyTempStorage;
Will this work?
MyType_tag MyType;
MyType_tag* pMyPntr = &MyType;
char *ugly[sizof(MyType_tag*)];
memcpy(ugly,&pMyPtr,sizeof(MyType_tag*));
MyType_tag* pMyOtherPntr;
memcpy(&pMyOtherPntr,ugly,sizeof(MyType_tag*));
That made me feel really bad :( I think I have to go take a shower and
wash my mouth out with soap ;)
--
NPV
"the large print giveth, and the small print taketh away"
Tom Waits - Step right up