I am getting an error on line 8, the constructor. I am just building the outline for my class and I really hope after this program I understand operators. My class has really picked up with operators and polymorphism back to back. I am trying to get some practice in order to understand each subject fully.
My thought was to initialize the constructor and I am getting an error. Can I have a hint why?
Code:#ifndef __polynomial__ #define __polynomial__ #include <iostream> #include <cmath> using namespace std; const int SIZE=10; class polynomial { private: int poly[SIZE]; int x; int terms; public: explicit polynomial(int[]=0, int=0, int=0); //default constructor void setPolynomial(); int getPolynomial(); ~polynomial(); polynomial operator+(int); polynomial operator-(int); }; #endifCode:#include "polynomial.h" #include <cmath> #include <array> using namespace std; //constructor polynomial::polynomial() : x(0), terms(0) { } void setPolynomial() { } int getPolynomial() { } polynomial operator+(polynomial b) { } polynomial operator-(polynomial a) { } polynomial::~polynomial() { }