questions to the Class II of the tutorial.

Hi,comrades.
I am studing class II here.
and I don't know the first ampersand& used in the following code.
I mean the ampersand sign between Cvector and Cvector::operator=
Anyone can explain it?
Thanks.


1
2
3
4
5
6
CVector& CVector::operator= (const CVector& param)
{
  x=param.x;
  y=param.y;
  return *this;
}
In C++, these denote a reference.

https://duckduckgo.com/?q=c%2B%2B+reference+parameters
Thanks.
but the link in your post cannot be accessed here.
I do not know why.

This use of & is not included in the tutorial of this website.
Could you explain a little bit for me.
Pasting some info here is also appreciated.
> but the link in your post cannot be accessed here.
I guess you failed at your username then ;)

Take a wild stab in the dark as to what it could possibly be, then paste something appropriate into a search engine which does work in whatever gulag you happen to be in.
Registered users can post here. Sign in or register to post.