Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Finding deleted virtual keywords

Finding deleted virtual keywords

Scheduled Pinned Locked Moved C / C++ / MFC
question
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    manustone
    wrote on last edited by
    #1

    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

    S 1 Reply Last reply
    0
    • M manustone

      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

      S Offline
      S Offline
      Steen Krogsgaard
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups