Can't create nested classes

Heinz billgates at microsoft.com
Tue Jan 23 11:44:26 PST 2007


Alexander Panek Wrote:

> Heinz wrote:
> > I can't also have variables like 'int i', it throws access violation. But why in the DMD page here http://www.digitalmars.com/d/class.html is listed a bunch of classes with 1 to 3 non-static members like int i?
> > 
> > Man, C# is a lot more flexible in this topic, why can we have non-static members in C# and not in D?
> 
> No offense intended, but I do think you're doing something wrong here. 
> Would you mind pasting the whole source code, please?


Sure man, attached is the code with the main file included, just compile with these 2 files and you're ready.

I noticed if i remove all references to type File or delegate, it works ok. I mean, you can have the delegate or the File but not both.

Good luck
-------------- next part --------------
A non-text attachment was scrubbed...
Name: heinz.zip
Type: application/zip
Size: 662 bytes
Desc: not available
Url : http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20070123/468373ba/attachment.zip 


More information about the Digitalmars-d-learn mailing list