Hi,
I would like to return a reference to a member variable:
class foo
{
int i;
int& geti() const;
};
int& foo::geti() const
{
return i;
}
But I get the following error:
invalid initialization of reference of type 'double&' from expression
of type 'const double'
Am I missing something? This seems like it should be doable.
-Billy