Abstract Class


2007-10-16 03:07:19 AM
cppbuilder18
Hi,
I'm trying to implkement the MVC pattern in Borland C++ Builder.
I have a pure virtual class:
class IDeviceTree
{
public:
IDeviceTree();
~IDeviceTree();
virtual void Fn1();
virtual void Fn2();
private:
};
My base class inherits the pure virtual class to use as an interface.
class MyClass : IDeviceTree
{
MyClass();
~MyClass();
virtual void Fn1();
virtual void Fn2();
}
When I try to compile there is a linker error since neither
IDeviceTree the not ~IDeviceTree exists since this is an abstract
class. Is there a directive that tells borland that the class is an
interface and as such does not require its own implementation of a
constructor? The keyword in C# is 'interface'. I'm after the
equivalent directive or a soluti9on to the linker error.