Meaning of ampersand in value returned by a function

Hello everyone, I'm learning C++ for the first time. As far as I understood using that syntax: "int& x" means passing the variable itself, for example as the argument of a function. What I cannot understand is the meaning of ampersand here:

int& sum (int a, int b){
int c;
c = a+b;
return c;
}

What's the meaning of this? If I return c, why should I be interested in reading his value again inside the function? The question arose from this piece of code found in tutorial of Classes(II):

CVector& CVector::operator= (const CVector& param)
{
x=param.x;
y=param.y;
return *this;
}

Thanks in advance :))

Last edited on
Topic archived. No new replies allowed.