Can virtual function be inline? if so how can compiler copy
the code during the compile time itself? since virtual
function call is determined @ run time.
A virtual function call results in the function being determined
by the dynamic type of the object. Most compilers will inline a
virtual function if they know the dynamic type of the object.
Some (very few) will also use profiling information: if the call
is in a critical loop, and the actual function called is almost
always the same, they'll generate an if on that type, inlining
the special, most frequent case, and using the usual virtual
call method otherwise.