Home > DeveloperSection > Forums > Can we declare a static function as virtual?
Goti Bandu

Total Post:119

Points:835
Posted on    November-17-2012 5:39 AM

 Visual C++ Visual C++ 
Ratings:


 1 Reply(s)
 2433  View(s)
Rate this:

hi every one

Can we declare a static function as virtual?

thanks



AVADHESH PATEL

Total Post:604

Points:4228
Posted on    November-19-2012 12:01 AM

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.

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

Follow MindStick