I overloaded operator = for the class TextureImage in the class but the compiler keep saying no viable operator "=" .
TextureImage& operator=(TextureImage i){
this->x = i.getX();
this->y = i.getY();
this->n = i.getN();
this->data = i.getData();
return *this;
}
If I add const
to the function the compiler says I can't assign to non-static data member within const member function.
So how to overloaded operator = here