All pastes #105928 Raw Edit

Someone

public cpp v1 · immutable
#105928 ·published 2006-07-30 00:28 UTC
rendered paste body
class parent {public:    char p;        parent() {        p = 'a';    }};class child: public parent {public:    char c;        child() {        c = 'b';    }};class other {public:    class parent *ptr;};int main() {    other test;        test.ptr = new child;    printf("p: %c", test.ptr->c); /* 32 `class parent' has no  member named `c' */        return 0;}