TITLE: Name scopes and inheritance PROBLEM: The following has the given errors. Can anyone explain this? taka@miwa.co.jp (Takanori Adachi) #include class Base { public: int foo() { return 1; } virtual int foo(int i) { return i; } }; class Derived : public Base { public: int foo(int i) { return i*2; } }; main() { Derived d; printf("%d\n",d.foo(10)); // ok; "20" is printed printf("%d\n",d.foo()); // error; argument 1 of type int // expected for Derived::foo() } RESPONSE: philc@ruby.aruba.UUCP (Phil Calvin), 21 Sep 92 The problem here is that Derived::foo is not in the same scope as Base::foo. As a result, the compiler is not even considering the Base::foo method. Check the ARM (Section 13.1, page 310) for a more detailed explanation