C++ Improper Function Definitions in Header Files
Explanation: Ensure that the function definitions in header files (e.g., subexpression.h,
operand.h, etc.) are correctly defined.
How would I properly define the header files beyond what I have done?
subexpression.h****
classSubExpression: publicExpression{
public:
SubExpression(Expression* left, Expression* right);
staticExpression* parse(stringstream& in);
protected:
Expression* left;
Expression* right;
};
operand****
classOperand: publicExpression{
public:
staticExpression* parse(stringstream& in);
};
variable.h****
classVariable: publicOperand{
public:
Variable(string name){
this->name = name;
}
intevaluate();
private:
string name;
};

C++ Improper Function Definitions in Header FilesExplanation Ensu.pdf

  • 1.
    C++ Improper FunctionDefinitions in Header Files Explanation: Ensure that the function definitions in header files (e.g., subexpression.h, operand.h, etc.) are correctly defined. How would I properly define the header files beyond what I have done? subexpression.h**** classSubExpression: publicExpression{ public: SubExpression(Expression* left, Expression* right); staticExpression* parse(stringstream& in); protected: Expression* left; Expression* right; }; operand**** classOperand: publicExpression{ public: staticExpression* parse(stringstream& in); }; variable.h**** classVariable: publicOperand{ public: Variable(string name){ this->name = name; } intevaluate(); private: string name; };