它显示我的分号语法错误,如何解决该错误?这是我编写的代码,但是我不确定为什么分号有错误。 错误2错误C2059:语法错误:';'这是错误消息
class IdNode
{
private:
char *id;
double value;
friend class Statement;
friend ostream &operator<<(ostream &out, const IdNode &node);
public:
IdNode(char *s = "", double e = 0){
id = strdup(s);
value = e;
}
bool operator==(const IdNode& node) const{
return strcmp(id, node.id) == 0;
}
};
class Statement
{
private:
list<IdNode> idList;
char ch;
double factor();
double term();
double expression();
void readId(char *);
void issueError(char *s){
cerr << s << endl;
exit(1);
}
double findValue(char *);
void processNode(char *id, double e);
friend ostream & operator<<(ostream &out, const Statement &s);
public:
Statement(){ }
void getStatement();
};