Try
class CMyClass { public: CMyClass(void) { } ~CMyClass(void) { } virtual void Foo() { } };
MetaQuotes - any comment on this?
Enigma71fx:
MetaQuotes - any comment on this?
MetaQuotes - any comment on this?
What is the problem?
class CMyClass { public: CMyClass(void) { } ~CMyClass(void) { } virtual void Foo() { } virtual bool Foo1() { return(false); } virtual int Foo2() { return(0); } };
stringo:
There are no pure virtual functions in the MQL5
OK stringo, thanks for confirmation.
There are no pure virtual functions in the MQL5
bucket:
You have misread then.
Old thread, but I don't like to open a new thread for a topic without solution.
Funny that the MQL4 documentation explains pure virtual functions and has samples for pure virtual functions.

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
Hello MetaQuotes,
Just as in the topic - how can I declare a pure virtual function in MQL5? I would like to use this mechanism to create interfaces or implement some design patterns. Normally in C++ I would write:
But the MQL5 compiler doesn't accept it. Should I just write:
??