B
bb
struct Base {
virtual void print() { std::cout << "** Base **" << std::endl; }
};
struct Deri : public Base {
void print() { std::cout << "** Deri **" << std::endl; }
};
struct myInterface {
virtual void vm(Base* bp) = 0;
};
struct myImpl : public myInterface {
void vm(Deri* bp) {
bp->print();
}
};
Hi, Please could you explain why the above implementation of method
vm() in 'myImpl' not acceptable?
Thanks.
virtual void print() { std::cout << "** Base **" << std::endl; }
};
struct Deri : public Base {
void print() { std::cout << "** Deri **" << std::endl; }
};
struct myInterface {
virtual void vm(Base* bp) = 0;
};
struct myImpl : public myInterface {
void vm(Deri* bp) {
bp->print();
}
};
Hi, Please could you explain why the above implementation of method
vm() in 'myImpl' not acceptable?
Thanks.