POV-Ray : Newsgroups : povray.off-topic : This is the sort of brokenness... : Re: This is the sort of brokenness... Server Time
6 Sep 2024 17:21:47 EDT (-0400)
  Re: This is the sort of brokenness...  
From: Nicolas Alvarez
Date: 18 Mar 2009 22:06:52
Message: <49c1a8bb@news.povray.org>
Darren New wrote:
> Warp wrote:
>>   I don't understand what you are saying. If a class in C++ does not
>>   expose
>> a member array, then you can't get to that member array from the outside,
> 
> int * p = (int *) 0x123456;
> *p = 27;

Undefined behavior.

> How about
> // Your code...
> class xyz {
>    public: int[10] x;
>    private int y = 0;
> }
> 
> // My code
>   xyz pdq;
>   pdq.x[10] = 27;

Undefined behavior.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.