Chris McDonald:
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) { } };

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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?