language: C++ 4.7.2 (gcc-4.7.2)
date: 680 days 8 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
class A
{
protected:
    int abc;
    A* ptr;
};
 
class C : public A
{
};
 
class B : public A
{
public:
    int foo()
    {
        return ptr->abc;
    }
};
 
prog.cpp: In member function ‘int B::foo()’:
prog.cpp:4: error: ‘int A::abc’ is protected
prog.cpp:17: error: within this context