单项选择题

A.定义基类时加virtual。
B.成员函数前加virtual。
C.在派生类名前加virtual。
D.定义派生类时,在基类名前加virtual。