https://www.mql5.com/en/docs/basis/oop/virtual

Documentation on MQL5: Language Basics / Object-Oriented Programming / Virtual Functions
- www.mql5.com
The virtual keyword is the function specifier, which provides a mechanism to select dynamically at runtime an appropriate function-member among the functions of basic and derived classes. Structures cannot have virtual functions. It can be used to change the declarations for function-members only. A virtual function may be overridden in a...
Alain Verleyen:
https://www.mql5.com/en/docs/basis/oop/virtual
Tks a lot!
https://www.mql5.com/en/docs/basis/oop/virtual

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I tried to use generic pointers to access the subclasses methods but I was unable to access the correct methods.
Can you help me to do it right?
I expected the direct and indirect access with the same output.