FinGeR Posted April 3, 2011 Report Share 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.