Re: will the pointer survive?
Date: Fri, 14 Nov 2003 12:34:32 +0100
> 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.
"You can't rightfully be a scientist if you mind people thinking
you're a fool."
- Re: Sliding window and wrap-around
... This works on my platform (GCC, Linux, x86) but AFAIU, conversion ... promoted to int before performing the subtraction? ...
- Re: Problem with linker
... but to have actually written a default constructor. ... such as overloading on int and pointer types. ... conversion of 0 to CString requires a user-defined conversion, ... acceleration operator *(distance d, time_squared t2); ...
- Re: Interesting list Validity (True/False)
... TypeError: int argument required ... If the gmpy writers are not allowing the conversion, ... it raises an OverflowError and the "%d" formatting ...
- Re: if(a);
... The type of the octal signed int literal 0 will be compared to the ... 'a' has type unsigned int, in which case 0 is converted to ... is still 0 after undergoing conversion, ...
- Re: [PATCH 1/2] Add function to convert between calendar time and broken-down time for universal
... convert time between calendar time and broken-down time. ... replace `int' with `unsigned int', ... needed of your email client is performing tab-to-space conversion. ... * Library General Public License for more details. ...