/* CSE 333 Lecture 16 Peer Instruction Question */ #include using std::cout; using std::endl; class A { public: virtual void Foo() { cout << "H"; this->Bar(); } void Bar() { cout << "A"; } }; class B : public A { public: virtual void Bar() { cout << "I"; } }; int main(int argc, char** argv) { // objects for you to use B b; B* b_ptr = &b; b_ptr->Foo(); cout << std::endl; return 0; }