Home > DeveloperSection > Interviews > Can we declare a static function as virtual?

Posted on    March-28-2011 7:51 AM

 OOPS OOPS 
Ratings:
 1 Answer(s)
  1674  View(s)
Rate this:

Mahesh Rawat
Mahesh Rawat

Total Post:138

Points:690
Posted on    March-28-2011 12:00 AM

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.

Don't want to miss updates? Please click the below button!

Follow MindStick