Accessing members through pointers to structs (also, CTFE associative arrays)

bauss (wtf happend to my name took some old cached title LOL??) via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Dec 13 13:33:43 PST 2016


On Tuesday, 13 December 2016 at 21:21:34 UTC, Ali wrote:
> On Tuesday, 13 December 2016 at 21:08:31 UTC, drug007 wrote:
>> (*d.room).name
>
> Oh yeah, tried that too. That at least compiles but gives a 
> runtime exception (bad address).

Try
(*cast(Room*)(d.room)).name


More information about the Digitalmars-d-learn mailing list