Can we override operator?

You can override operators, but they might not do what you want . The reason is that operators (actually overloads in general) are selected from the static type of an object. If you now have a reference-to-base which is bound to a derived instance, it will not call the operator for the derived class.

Sizin İçin Seçtik  Does OnePlus 9 Pro support 5G?

Leave a Reply

Your email address will not be published. Required fields are marked *