virtual functions problem

0
CPP
cpp
OUTPUT