I realize this is probably a dumb question but I couldn't find the answer anywhere... What is the purpose of the '&' symbol in C++ functions? Such as
vec2& operator+(vec2& left, const vec2& right)
{
return left.add(right);
}
I'm following a youtube series that's a little over my head, but I'm doing fine because all the code is there. However that 'and' symbol keeps popping up and I'd really like to know what it is... Does it have something to do with classes?
Here's exactly what I'm watching: https://www.youtube.com/watch?v=-peYVLeK0WU Guy from a channel called "TheChernoProject" making a simple game engine. Also, this is Visual Studio 2013 C++, if that changes anything.