Referencing of a value

I am new to C++ and have some doubts regarding referencing of values. I am giving an example below

int i=10;
int &j=i;

What is meant by the above stmt? As I am trying to compare C++ with C programming, I understood from the above that j is referencing to i. Then what is &j means address of i or address of j is stored in address of i.


Please clarify.

In this case & has nothing to do with & that returns an address. int& is a type. Just like int* has nothing to do with dereferencing.
Topic archived. No new replies allowed.