Error cause by inheritance
I tried the following code but i couldnt figure out why does the error occurs. Can someone let me know whats wrong with this code ??
Code:
class Expression {
public:
Expression() { }
virtual ~Expression() { }
};
class aaa : public Expression{
public:
//test3.cpp:18: error: syntax error before `*' token
//test3.cpp:18: error: missing ';' before right brace
aaa(bbb *x,Expression *y){ }
private:
//test3.cpp:20: error: semicolon missing after declaration of `aaa'
bbb *lh;
Expression *rh;
};
//test3.cpp:23: error: syntax error before `}' token
class bbb : public Expression{
public:
bbb(){ }
};