fork download
#include 

void foo()
{
    std::cout << "global foo()" << std::endl;
}

struct A {
    void foo()
    {
    std::cout << "A::foo()" << std::endl;
    }
};

struct B : public A {
    void call()
    {
        foo();
    }
};

int main(int argc, char **argv )
{
    B b;
    b.call();
    return 0;
}
Success #stdin #stdout 0.02s 2724KB
stdin
Standard input is empty
stdout
A::foo()