Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++ Member Function Lookup

Name: Anonymous 2010-02-06 12:22

I'm reading `C++ Common Knowledge' to find out more about this fascinating pile of crap. I'm currently in the section `Member Function Lookup' and discovered this gem:

class Foo {
public:
        void x(int) {}
};

class Bar : Foo {
        int x; /* This is fuckin' private. */
};

int main()
{
        Bar bar;
        bar.x(3);
        return 0;
}


I understand what it does and why it does it, but what the fuck was Bjarne thinking when he decided this? If this is object-oriented programming, I'm Ada Lovelace. HIBT?

Name: Anonymous 2010-02-07 11:42

I don't really get this thread, but neither >>1 or >>12 compile under GCC.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List