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
|