Why do private member variables behaved like protected in the same module when creating deriving class?
Atila Neves
atila.neves at gmail.com
Sat Oct 27 18:06:36 UTC 2018
On Saturday, 27 October 2018 at 15:24:19 UTC, unprotected-entity
wrote:
> On Saturday, 27 October 2018 at 14:20:10 UTC, Steven
> Schveighoffer wrote:
>>
>> If b didn't have an `x` in it, then how would this work?
>>
>
> Only in D, does b have x in it.
>
> In C++, Java and C#, b does *not* have x in it.
It might be that you're confusing "have" to mean "has access". In
other languages b doesn't have access to x, but it most
definitely has an x inside of it.
More information about the Digitalmars-d
mailing list