Access violation when using classes (beginner)

Mike Parker aldacron71 at yahoo.com
Sat Jan 6 10:02:10 PST 2007


Robin Allen wrote:
> Ah, so you only ever work with references, and you always use new. Thanks to both
> of you.

When dealing with classes, yes. But not with structs, which are value 
types. So this:

MyStruct c;
c.someFunc();

actually works, since struct instances are not references.


More information about the Digitalmars-d-learn mailing list