CAN WE DECLARE A STATIC FUNCTION AS VIRTUAL?

Mahesh Rawat

Total Post:138

Points:690
Posted by  Mahesh Rawat
OOPS 
 1899  View(s)
Ratings:
Rate this:
  1. Mahesh Rawat

    Post:138

    Points:690
    Can we declare a static function as virtual?

    NO,
    Reason:
    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.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!