I've Got A problem On Referencing Functions

iman_snake's Avatar, Join Date: Jun 2006
Newbie Member
Hello all u guys out there

Ive got a problem Undrestanding in example what it means

class point
{
...
}


point &function1()
{
point sample;
return sample;
}

whats meaning of & in a function??

Tank you
0
Aztec's Avatar, Join Date: May 2006
Contributor
Function is returning reference of point class object.
0
iman_snake's Avatar, Join Date: Jun 2006
Newbie Member
Yeah I've Got it C++ Adicted boy
tanx in advance

But second thing here is this program got an error
because when function Finished Sample Will Die
And there is nothing to refere
Tanx in anyway ive got it