class with parent class and implement an interface
I have a class hierarchy and want some of those objects to also implement an interface something like below. Is this possible in MQL5?
the example below doesnt work obviously. Is there some way to get a class to have a parent class and implement an interface?
No multiple inheritance in MQL5 (so far) - try other workaround approaches, for example, composition; or derive Base from the interface, or probably play with templates.
class Base2 { public: template<typename T> void doSomething(void) { } };
Hi,
I have a class hierarchy and want some of those objects to also implement an interface something like below. Is this possible in MQL5?
the example below doesnt work obviously. Is there some way to get a class to have a parent class and implement an interface?