Hi every one, I'm very new in c++ programming, and I'm encounting some difficulties with my program. It's supposed to create a polynomial with a linked list. It keeps giving me errors and I don't know what to do anymore. The polynomial is created with a single nested statement in the constructor. But it doesn't seem to work. Please help me.

class Term

{

public:

Term (double coefficient, int exponent=0, Term *next=NULL);

double evaluate (double x);

void print();

private:

double coefficient;

int exponent;

Term *next;

};

Term::Term(double coefficient, int exponent = 0, Term *next = NULL)

{

Term *pt = new Term(1,10, new Term(-3,4,new Term (17)));

}

double Term::evaluate (double x);

{

if (Term *pt != NULL)

{

while(pt->next != NULL)

{

int expo = pt->exponent;

double accum+ = pt->coefficient * pow(x, expo);

pt=pt->next;

}

pt->next = NULL;

}

return accum;

}

int main()

{

Term test;

double result = test.evaluate (2);

cout << "and the answer is: " << result << endl;

return 0;

}