convert interger to pointer
Moritz Warning
moritzwarning at web.de
Sat Jun 28 21:17:13 PDT 2008
On Sun, 29 Jun 2008 04:05:02 +0200, Mike wrote:
> On Sun, 29 Jun 2008 03:35:03 +0200, Moritz Warning
> <moritzwarning at web.de> wrote:
>
>> Is it possible to circumvent the type system and convert an integer to
>> a pointer or class type? They won't ever be dereferenced, of course.
>
> union
> {
> int integer;
> void *pointer;
> }
Would work probably.
But I found another solution using a static and alias to fit in two base
types quite nicely. (size_t and void*)
More information about the Digitalmars-d
mailing list