Pacikage level access broken?

Timon Gehr timon.gehr at gmx.ch
Tue Apr 24 00:35:56 PDT 2012


On 04/23/2012 07:43 PM, Jonathan M Davis wrote:
> On Monday, April 23, 2012 13:42:36 Jacob Carlborg wrote:
>> On 2012-04-23 10:26, Era Scarecrow wrote:
>>> On Monday, 23 April 2012 at 06:19:12 UTC, Jacob Carlborg wrote:
>>>> "public" is the default access level.
>>>
>>> So it is... That explains why the tests came out backwards on the
>>> results.... Wasn't it private by default in C++? I honestly don't know
>>> sometimes.
>>
>> I think so. If you use "class" it's private by default. If use "struct"
>> it's public by default. That's basically the only difference between
>> "class" and "struct" in C++, if I recall correctly.
>
> That's correct. In C++, struct and class are identical except that a class'
> members are private by default and a struct's members are public by default.
>
> - Jonathan M Davis

The same holds for the default base class access.


More information about the Digitalmars-d-learn mailing list