digitalmars.D.learn - Pointer indirections
- DLearner (11/11) May 04 2021 Hi
 - Imperatorn (2/15) May 04 2021 Code or it didn't happen 🌞
 - =?UTF-8?Q?Ali_=c3=87ehreli?= (5/17) May 04 2021 Sounds like "undefined behavior" somewhere in the program, effects of
 
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
 May 04 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 🌞
 May 04 2021
On 5/4/21 3:06 PM, Imperatorn wrote:No.Is there any limitation as to the number of pointer indirections?Sounds like "undefined behavior" somewhere in the program, effects of which can be confusing. AliI 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.
 May 04 2021








 
 
 
 =?UTF-8?Q?Ali_=c3=87ehreli?= <acehreli yahoo.com>