```c++ #include class A { private: int a_; public: A(int x=10): a_(x) {}, int f(int x) { return g(x * x); }, virtual int g(int x) const { return x % a_; }, },; class B : public A { private: int b_; public: B(int x): b_(x) {}, virtual int f(int x) const { return g(x + x); }, int g(int x) const { return x % b_; }, },; int main() { A* a = new A; std::cout f(5) f(4) << std::endl; },```
well here got `a`execution well since its based on parent class and didn't have to check children, but in `b` i though the `b->f(4)` would call B::f(4), but instead called A::f(4)