Download MetaTrader 5
To add comments, please log in or register
Are you accustomed to using the standard library? MQL5 has one!
Abejorro
165
Abejorro 2016.03.07 12:09 

Hello,

my problem: Two classes, one inherits. But, the inherited class has to be constructed with a parameter... And I can't make it...

FatherClass:

class clsGauss01

      clsGauss01(int Index);

SonClass:

class clsGaussTS01 : public clsGauss01(0)

But the Message:

'0' - declaration without type    clsGaussCalcTS01.mqh

Is there a way to make it like my trial above - like in c ? I can work around with a simple instance, but this one-line-way would be more comfortable.

Many thanks in advance for your help

whroeder1
13600
whroeder1 2016.03.07 15:10  
class clsGaussTS01 : public clsGauss01{
 public:
   clsGaussTS01(int v=0) : clsGauss01(v){} // Ctor
   :
};
Abejorro
165
Abejorro 2016.03.07 21:20  

WHRoeder:

class clsGaussTS01 : public clsGauss01{
 public:
   clsGaussTS01(int v=0) : clsGauss01(v){} // Ctor
  
};



Great !! - Is working. Thank you very much !
/
To add comments, please log in or register