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:
“Neither dead nor alive, the hostage is suspended by an incalculable outcome. It is not his destiny that awaits for him, nor his own death, but anonymous chance, which can only seem to him something absolutely arbitrary.... He is in a state of radical emergency, of virtual extermination.”
—Jean Baudrillard (b. 1929)
“A revolution is not a dinner party, or writing an essay, or painting a picture, or doing embroidery; it cannot be so refined, so leisurely and gentle, so temperate, kind, courteous, restrained and magnanimous. A revolution is an insurrection, an act of violence by which one class overthrows another.”
—Mao Zedong (1893–1976)