Is multiple inheritance allowed in mql4?

Back to topics list To post a new topic, please log in or register
avatar
207
Rasoul 2015.03.16 12:40
 

I am writing a library in mql4 language in which I would like to have multiple inheritance. I use the following format:

class A
{
   // some variables and functions
};

class B
{
   // some variables and functions
}

class C : public A, public B
{
   // some variable and functions
};


But at compile time it complains that it expects to see '{' after the comma in front of `public A`. Does anybody know whether multiple inheritance feature is supported by MQL4?

avatar
12984
WHRoeder 2015.03.16 13:52 #
 

Is multiple inheritance allowed in mql4?

Inheritance - MQL4 Documentation bottom of the page
MQL4 has no multiple inheritance
avatar
207
Rasoul 2015.03.16 15:32 #
 
WHRoeder:

Is multiple inheritance allowed in mql4?

Inheritance - MQL4 Documentation bottom of the page
MQL4 has no multiple inheritance
Thanks for your answer! It looks like to have a programming language in which the programmer can write any function but the function has to have maximum one input parameter! I really sometimes do not understand the logic behind the features implemented in MQL4.
avatar
1109
Ovo 2015.03.16 16:18 #
 
Rasoul:
Thanks for your answer! It looks like to have a programming language in which the programmer can write any function but the function has to have maximum one input parameter! I really sometimes do not understand the logic behind the features implemented in MQL4.
JAVA does not have multiple inheritance either, and it is considered to be very pure and powerful OOP language. The trouble with MQL4 does not originate in inheritance.
avatar
207
Rasoul 2015.03.16 16:44 #
 
Ovo:
JAVA does not have multiple inheritance either, and it is considered to be very pure and powerful OOP language. The trouble with MQL4 does not originate in inheritance.
In Java we have the concept of  'interface' which lets us implement multiple inheritance somehow... Anyway, MQL4 does not look JAVA style programming, it is essentially based on C/C++ programming style, so it is logical that one expects to see the similar features between two languages...
avatar
1109
Ovo 2015.03.16 17:14 #
 
Rasoul:
In Java we have the concept of  'interface' which lets us implement multiple inheritance somehow... Anyway, MQL4 does not look JAVA style programming, it is essentially based on C/C++ programming style, so it is logical that one expects to see the similar features between two languages...
Whatever you say, but the weak point is not the OOP language, the weakest point is the editor. Try it, and all your hair goes off head.
avatar
207
Rasoul 2015.03.19 23:24 #
 
Ovo:
 but the weak point is not the OOP language, the weakest point is the editor. Try it, and all your hair goes off head.
Whatever you say...
Back to topics list  

To add comments, please log in or register