CAN BE DECLARE A STATIC FUNCTION AS VIRTUAL?

Somesh

Total Post:21

Points:147
Posted by  Somesh
OOPS 
 1671  View(s)
Ratings:
Rate this:
Can be declare a static function as virtual?
please give the reason also.
thanks
  1. Amit Singh

    Post:103

    Points:721
    Re: Can be 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!