I'm having some problems compiling my code. It says,
error C2355: 'this' : can only be referenced inside non-static member functions or non-static data member initializers
part of the code where the error shows up
double getR() {
return this->r;
}
double getG() {
return this->g;
}
double getB2() {
return this->b2;
}
also here
rez.r = this->r / 2 + a.getR() / 2;
rez.g = this->g / 2 + a.getG() / 2;
rez.b2 = this->b2 / 2 + a.getB2() / 2;
Any ideas?
THAT WAS FIXED.
Same error on this part of code now...
rez.r = this->r / 2 + a.getR() / 2;
rez.g = this->g / 2 + a.getG() / 2;
rez.b2 = this->b2 / 2 + a.getB2() / 2;
it also says
error C2227: left of '->r' must point to class/struct/union/generic type