Finding deleted virtual keywords
-
Hi All I'm facing the following strange thing on my code! I discovered that in my derived classes the keyword virtual has been deleted when the base class got it. It's incredible because I have tons of code where this occurrs!! Do you know a way to trap this in my source code? Does exist some tool or trick or compiler option maybe? Thanks to all Manu
-
Hi All I'm facing the following strange thing on my code! I discovered that in my derived classes the keyword virtual has been deleted when the base class got it. It's incredible because I have tons of code where this occurrs!! Do you know a way to trap this in my source code? Does exist some tool or trick or compiler option maybe? Thanks to all Manu
What do you mean by "has been deleted" - did the editor delete it or what? Anyway, it really doesn't matter. If a method is declared virtual in a base class it is implicitly virtual in a derived class even if it is not declared as such in the derived class. This makes sense as the entry in the vtable is already there (from the base class declaration), no need to declare it again. But I still don't understand how it got deleted...
Cheers Steen. "Are you gonna check your makeup when you're done whining?" John Simmons, 05/31/2006