I am trying to implement some getters and setters in an abstract class that I am calling from the derived class draw functions but I can't get the thing to compile and I don't know why. Shape is the abstract base class. I am getting the compiler error that says " passing `const Circle' as `this' argument of `void Shape::SetSize(float, float, float)' discards qualifiers" Below is the code I have for one of the setters and the way I am calling it from the draw functions.
protected:
float Sizex, Sizey, Sizez; //the member variables for this setter
void SetSize(float sx,float sy,float sz); //the declaration
void Shape::SetSize(float sx,float sy,float sz){ //the definition
this->Sizex = sx; this->Sizey = sy; this->Sizez = sz;
glScalef(Sizex,Sizey,Sizez);
}
Shape::SetSize(Sizex,Sizey,Sizez); // the call from the draw functions
I would greatly apprreciate any help I can get. Much Thanks, Jody Bush