i have a certain class and i want to create 2 operators that will work together
like class with array and i want to change a certain index in the array
like this obj[3]=5
is this possible? if yes,how?
this is the code i made for [] operator
double Polynomial::operator[](int index) const {
int maxT = this->currentMax;
if (index > 0 && index < this->getDegree(false))
return this->coefficients[index];
cout << "overflow in index";
system("pause");
}