Listing 1: A program with a subtle bug caused by name hiding
#include <iostream> #include "lib.h" using namespace std; class foo { public: foo(); operator char const *() const; }; foo::foo() { } foo::operator char const *() const { return "class"; } int main() { char const *p; p = foo(); cout << p << '\n'; return 0; } //End of File