✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
#include <iostream> class A{public: virtual void Foo() { std::cout << "A"; }}; class B : public A{public: void Foo() override { std::cout << "B"; }}; int main(){ B b; A a = b; // ! a.Foo();}