Pointer indirections

Imperatorn johan_forsberg_86 at hotmail.com
Tue May 4 22:06:27 UTC 2021


On Tuesday, 4 May 2021 at 21:16:10 UTC, DLearner wrote:
> Hi
>
> Is there any limitation as to the number of pointer 
> indirections?
>
> I have a construct:
>    a.b.c.d = x;
> where all the variables are pointers to struct (the same 
> struct).
>
> This fails with 'Access Violation',
> but if I change the code to:
>
>  temp = a.b.c;
>  temp.d = x;
>
> everything seems to work.
>
> Best regards

Code or it didn't happen 🌞


More information about the Digitalmars-d-learn mailing list