A closed virtual method of a base class cannot be called from an inheritor, but can be overridden.
Thanks, I didn't know that. Something I can't think of where this would be useful. It's very similar to X_Macro. I'll try to put together a similar example to get a better understanding.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I didn't write anything about opening and closing prices.
Why an error for private methods?
Why is there an error for private methods?
Private has nothing to do with it, your function is declared as final and you are trying to override it.
ZS. I tried to compile - the compiler says what the problem is.
Private has nothing to do with it, you declare this function as final.
So there are no parent private-methods in an inherited class. That's why there shouldn't be any overriding.
Hello there.
Public inheritance. The private methods of the parent are not available from the descendant, according to the compiler.
A private virtual method of a base class cannot be called from an inheritor, but you can override it, which is what you are trying to do.
A closed virtual method of a base class cannot be called from an inheritor, but can be overridden.
I'll try to make a similar example to get a better understanding.
That's a nice touch.
I guess such a construction could come in handy somewhere.
public inheritance. The parent's private-methods are not available from the descendant, according to the compiler.