Re: will the pointer survive?
From: Unforgiven (jaapd3000_at_hotmail.com)
Date: 11/14/03
- Next message: Rob Williscroft: "Re: Enum within function, is this standard?"
- Previous message: Steve: "Template code inline"
- In reply to: Allen: "will the pointer survive?"
- Next in thread: EventHelix.com: "Re: will the pointer survive?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 14 Nov 2003 12:34:32 +0100
Allen wrote:
> Hi all,
>
> Will my pointer survive this conversion?
>
> MyType_tag MyType;
> MyType_tag* pMyPntr = &MyType;
> int iUglyTempStorage = (int)pMyPntr;
> MyType_tag* pMyOtherPntr = (MyType_tag*)iUglyTempStorage;
Only if you're using a platform where an int is the same size as a pointer.
-- Unforgiven "You can't rightfully be a scientist if you mind people thinking you're a fool."
- Next message: Rob Williscroft: "Re: Enum within function, is this standard?"
- Previous message: Steve: "Template code inline"
- In reply to: Allen: "will the pointer survive?"
- Next in thread: EventHelix.com: "Re: will the pointer survive?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|