abstract function templates

Nrgyzer nrgyzer at gmail.com
Sun Dec 26 14:14:03 PST 2010


I just figured out that this doesn't work, when I use a array with
super class as base type, for example: Drawable[] textures;

Then, I'll get the following error:

"Error: function draw!(void*).draw non-virtual functions cannot be
abstract".

I just implemented the draw-function as empty function, which doesn't
create any errors, but I seems that it's not calling the draw-
function of any texture instance. It seems that it is always calling
Drawable.draw() - the empty function. When I create a new instance of
my Texture-class, it calls the draw-function of the texture-instance.


More information about the Digitalmars-d-learn mailing list