In object-oriented programming, a virtual class is an inner class that can be overridden by subclasses of the outer class.
Virtual classes are inner classes of another outer class, which behave like virtual functions. This means they can be overridden in a subclass of the outer class, and the run time type of a virtual class depends on the run time type of an object of the outer class. (Just like the run time type of an object decides which virtual function should be used.)
Like this a run time instance type of the outer class object not only decides on the polymorphic type of his own type object, but also on a whole family tree of virtual class members.
Famous quotes containing the words virtual and/or class:
“Tragedy dramatizes human life as potentiality and fulfillment. Its virtual future, or Destiny, is therefore quite different from that created in comedy. Comic Destiny is Fortunewhat the world will bring, and the man will take or miss, encounter or escape; tragic Destiny is what the man brings, and the world will demand of him. That is his Fate.”
—Susanne K. Langer (18951985)
“There is a certain class of people who prefer to say that their fathers came down in the world through their own follies than to boast that they rose in the world through their own industry and talents. It is the same shabby-genteel sentiment, the same vanity of birth which makes men prefer to believe that they are degenerated angels rather than elevated apes.”
—W. Winwood Reade (18381875)