Record Detail

Compile Error

/in/polynomial.cpp: In member function 'void Polynomial::setCoefficient(unsigned int, int)':
/in/polynomial.cpp:17:8: error: 'n_degree' was not declared in this scope
     if(n_degree >= MAX_DEGREE){
        ^~~~~~~~
/in/polynomial.cpp:17:8: note: suggested alternative: 'degree'
     if(n_degree >= MAX_DEGREE){
        ^~~~~~~~
        degree
/in/polynomial.cpp: At global scope:
/in/polynomial.cpp:75:6: error: redefinition of 'void Polynomial::setDegree(unsigned int)'
 void Polynomial::setDegree(unsigned int degree){
      ^~~~~~~~~~
In file included from /in/polynomial.cpp:1:0:
/in/compile/polynomial.h:56:8: note: 'void Polynomial::setDegree(unsigned int)' previously defined here
   void setDegree(unsigned int degree) { this->degree = degree; };
        ^~~~~~~~~
/in/polynomial.cpp:79:6: error: redefinition of 'void Polynomial::setEmpty(bool)'
 void Polynomial::setEmpty(bool empty){
      ^~~~~~~~~~
In file included from /in/polynomial.cpp:1:0:
/in/compile/polynomial.h:58:8: note: 'void Polynomial::setEmpty(bool)' previously defined here
   void setEmpty(bool empty) { this->empty = empty; };
        ^~~~~~~~
/in/polynomial.cpp: In member function 'bool Polynomial::repOK()':
/in/polynomial.cpp:85:25: error: invalid operands of types 'int*' and 'long unsigned int' to binary 'operator/'
     if(sizeof(this->coef/sizeof(int)) >= MAX_DEGREE){
               ~~~~~~~~~~^~~~~~~~
/in/polynomial.cpp:87:5: error: expected ';' before '}' token
     }
     ^

Information

Submit By
Type
Submission
Homework
Exercise 6
Language
C++
Submit At
2022-11-15 14:07:30
Judged At
2022-11-15 14:07:30
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes