newbie: Access violation because of "class"

bearophile bearophileHUGS at lycos.com
Fri Apr 30 04:11:39 PDT 2010


Larry Luther:

> Why do I get an "object.Error: Access Violation" in the following code?
> If I change "class" to "struct" and remove "public:" I don't get an error.
> I'm using D2.

D classes are not like C++ classes, they are managed by reference only, as in Java. See the scope keyword too.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list