Year^^,
'new' and virtual is working now.

A derived class can now implement a method with the same name as its parentclass.
Its handled like 'new' in c++.

for example if CTestClass implements Foo, and CRectangle is derived from CTestclass, CRectangle can now implement Foo aswell.

if you do:
Code:
CRectangle* LRect;
  ...
  LRect.Foo(LRect);



This will call the method foo of CRectangle

and you can do this:
Code:
CRectangle* LRect;
  CTestClass* LTest;
  ...
  LTest = LRect;
  LRect.Foo(LRect);
  LTest.Foo(LTest);



for LTest, the Foo method of CTestClass is called.

BUT(for the same example as above):
If CTestClass declares Foo as virtual, in both cases Foo of CRectangle is called.

Another nice feature is "super".
If your class reimplements a parentsclass method, you can do this:

Code:
void CRectangle::Foo()
{
  super(This);//will call Foo of CTestClass
  //and go on with my stuff
}



Next step: implementing custom constructors.

Greets
Rackscha


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development