Home > Back-end > C polymorphism of a small problem
C polymorphism of a small problem
Time:09-25
1, pure virtual function in the base class does not provide its specific implementation? I have a program is if you don't provide will not be able to continue to the back of the operation, but I provides its concrete implementation is not wrong, but running right, strives for the bosses to give directions, 2, using virtual declare a virtual function in a base class, but behind all of the derived class if useful to this function in the base class, if we can no longer write virtual. Can also write? Write a function in the interface function with virtual, in its concrete realization function is not can write virtual this keyword (I try to write there will be wrong) Your bosses to give directions, thank you!