jamesjuett / lobster

Interactive Program Visualization Tools
8 stars 3 forks source link

Qualified Call to Base Class Implementation #341

Open jamesjuett opened 2 years ago

jamesjuett commented 2 years ago
#include <iostream>

using namespace std;

class A {
  virtual void foo() {
    cout << "hi" << endl;
  }
};

class B : public A {

  void foo() override {
    A::foo();
    cout << "hi" << endl;
  }
};

int main() {
  B b;
  b.foo();
}