FinGeR Posted April 3, 2011 Report Posted April 3, 2011 MQL5 :: OOP (object oriented programming)Ein Beispiel für den Aufruf einer rein virtuelle Funktion übergeordnete einer child class. //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ class CBase { public: virtual void Create() { Print("Base");} }; //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ class CChildren : public CBase { public: virtual void Create() { CBase::Create(); Print("Child"); } }; //+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ void OnStart() { //--- CChildren Child; Child.Create(); } 3
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now