Returning reference

 

Hello,

is it currently possible to return a reference from a class method?

For example:

int& classA::getInt()
{
  return mInt;
}


If not: what would be an alternative?

Maybe returning a pointer?

Thanks