Pacikage level access broken?
Jonathan M Davis
jmdavisProg at gmx.com
Mon Apr 23 10:43:18 PDT 2012
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
More information about the Digitalmars-d-learn
mailing list