Download MetaTrader 5

How do I declare an abstract base class in the new beta version of MQL4?

To add comments, please log in or register
cyclops993
115
cyclops993  

How do I declare an abstract base class in the new beta version of MQL4 or, similarly, in MQL5? The language doesn't seem to permit it, despite being heavily based on C++.

Alain Verleyen
Moderator
32756
Alain Verleyen  
cyclops993:

How do I declare an abstract base class in the new beta version of MQL4 or, similarly, in MQL5? The language doesn't seem to permit it, despite being heavily based on C++.

https://www.mql5.com/en/forum/15509
Ex Ovo Omnia
3317
Ex Ovo Omnia  
Lol, there is no abstract classes, nor methods, and no interfaces... Yes, you are right, it is much more inspired by C++ than JAVA.
cyclops993
115
cyclops993  
Ovo:
Lol, there is no abstract classes, nor methods, and no interfaces... Yes, you are right, it is much more inspired by C++ than JAVA.

(As I think you know, C++ does have abstract base classes. So do Java, the .NET languages, Python etc etc etc).

Thanks for the confirmation. The documentation doesn't explicitly say "there are virtual functions but no abstract functions", but your and angevoyageur's answers appear to be definitive. Just wanted to check.

Ex Ovo Omnia
3317
Ex Ovo Omnia  
cyclops993:

(As I think you know, C++ does have abstract base classes. So do Java, the .NET languages, Python etc etc etc).

Thanks for the confirmation. The documentation doesn't explicitly say "there are virtual functions but no abstract functions", but your and angevoyageur's answers appear to be definitive. Just wanted to check.

No problem, I was snooping for the abstract functions a few days ago. I have been trying to find the most comfortable way of coding for me, and I am converging slowly.. For example I still did not find a way how to simulate packages.

The very uncomfortable thing (in this beta stage) is, that if something does not work, it still may be a bug, or a feature. You are never sure.

To add comments, please log in or register