Jesse Phillips jessekphillip...@gmail.com wrote:
auto hi = hello in b.all;
auto foo = cast(B) hi;
The result was that b.label wasn't the same, and printing out stuff
resulted in a bunch of garbage.
Not surprising. hi is pointing to a reference (pointer) to a B instance,
I usually avoid using pointers and classes together (actually I don't use
pointers very much). But using 'in' on an associative array provides a pointer.
In any case, I ended up casting the pointer to the class type. (The simplified
example isn't showing the behavior). The results were not
On Thursday, November 18, 2010 14:20:01 Jesse Phillips wrote:
I usually avoid using pointers and classes together (actually I don't use
pointers very much). But using 'in' on an associative array provides a
pointer.
In any case, I ended up casting the pointer to the class type. (The
Jonathan M Davis Wrote:
Just dereference the pointer. I believe that in effect you have a pointer to
a
reference, not a pointer to an Object. Regardless of what it does internally
though, the way to get at the object is to dereference it. If you had
The question wasn't exactly about how