What am I doing wrong here? The compiler tells me it is a syntax error.
class Color {
private:
float rgba[4];
public:
Color(float red, float green, float blue, float alpha=1.0):
this->rgba[0] (red * alpha),
this->rgba[1] (green*alpha)
this->rgba[2] (blue*alpha)
{
}
};
this->rgba[0]is an error. The only thing that can appear after:is a member identifier, i.e.rgbais the only option for this class