Return values of functions

Hello everyone. This is not the first time that I see data structures in C++ but still there are ones that are creative. I am recently working on a project which requires the use of openCV library. While I was reading the tutorial, I came up with this time of function decleration:

1
2
3
4
  Mat& ScanImageAndRedudeC(Mat& I, const uchar* const table) //I am not familiar with this decleration.
  {
     //Some code here...
  }


I understand the argument "Mat& I", but I didn't understand the data type that the function returns, which is "Mat&". Does it return an address?
Does it return an address?

No, it returns a reference.
Last edited on
@MikeyBoy

Can you give me a little example?
A reference.

Is there any documentation for that function? What does the function code actually return?
Can you give me a little example?

Any C++ textbook should explain references. If yours doesn't, it's worthless, so burn it and get a better one.
Ok guys. I got my answer thanks a lot.
Topic archived. No new replies allowed.