. , ( " , , ?" , , " " ).
Using marking a function as virtual is what you ask the compiler to defer or determine the "TYPE" of the object that calls this function at run time, rather than the usual "compile time" method. This is achieved using pointers to objects. Therefore, to put it in a simple line "Use pointers to objects to use virtual functions."
source
share