Vec2& operator+=(Vec2 const& v);
and
Vec2 operator+(Vec2 const& u , Vec2 const& v);
im supposed to create functions in a class for each of those lines. there are even more but if someone could explain me what they are about, im sure of it that i can do the rest on my own.
so what are my ideas? Vec2 is the name of my class probably meaning this operator is an object of this class. but at the same time this doesnt make any sense, because there is this " += " that shows to me this is a line where you basically just do this:
Vec2& operator = Vec2& operator + Vec2 const& v
but i guess this is probably wrong. my next guess was this is a function that should start with { inserting the body instead of this ;
the second one looks to me like its a function for real, but why is a plus following the operator. does this mean this is a special way to name a function and the plus doesnt actually mean anything?
i hope someone can explain me what this is about. im sorry to bother you with such a specific question :/