How does Name lookup work when using multiple inheritance in C++?
Why does the following work(I know it would not work when d.f(5)): #include <string> #include <iostream> struct A { int f(int a) { return a*a; } }; struct B : A { std::string f(std::string string) { return "Hello " + string; } }; struct Derived : B {}; int main() { Derived d; std::cout <<… Read More How does Name lookup work when using multiple inheritance in C++?