hi Goti, according your question, can we declare a static function as virtual?, answer is No. The virtual function mechanism is used on the specific object that determines which virtual function to call. Since the static functions are not any way related to objects, they cannot be declared as virtual.
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
according your question, can we declare a static function as virtual?, answer is
No. The virtual function mechanism is used on the specific object that determines which virtual function to call. Since the static
functions are not any way related to objects, they cannot be declared as virtual.