M
m_schellens
With my compiler (g++ 3.4) and the following input
I get:
test.cpp:4: error: `ProgNode*ProgNode::down' is protected
test.cpp:17: error: within this context
Is this a compiler bug or what am I missing?
Thanks,
marc
class ProgNode
{
protected:
ProgNode* down;
ProgNode* right;
public:
ProgNode();
};
class TrinaryExpr: public ProgNode
{
public:
TrinaryExpr(): ProgNode()
{
down = new ProgNode();
down->down = 0;
}
};
int main( int argc, char* argv[])
{
return 0;
}
I get:
test.cpp: In constructor `TrinaryExpr::TrinaryExpr()':g++ test.cpp
test.cpp:4: error: `ProgNode*ProgNode::down' is protected
test.cpp:17: error: within this context
Is this a compiler bug or what am I missing?
Thanks,
marc
class ProgNode
{
protected:
ProgNode* down;
ProgNode* right;
public:
ProgNode();
};
class TrinaryExpr: public ProgNode
{
public:
TrinaryExpr(): ProgNode()
{
down = new ProgNode();
down->down = 0;
}
};
int main( int argc, char* argv[])
{
return 0;
}