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)
“There is ... a class of fancies, of exquisite delicacy, which are not thoughts, and to which, as yet, I have found it absolutely impossible to adapt language.... Now, so entire is my faith in the power of words, that at times, I have believed it possible to embody even the evanescence of fancies such as I have attempted to describe.”
—Edgar Allan Poe (18091849)