Possible Duplicate:
References in C++
What does int & mean
I am having difficulty understanding the statement int &f = d
in the following code. I would appreciate it if someone could clear this up
int main()
{
int d = 13 ;
int &f = d ;
std::cout << f;
}
Edit : I am familiar with the concept of references sorry I didnt give enough background. I know that if i do something like this
int a = 12
std::cout << &a //this gives the address of a and not the content of the address which is 12
Now my issue with int &f = d
The problem to me is
f seems to require an address whereas d is giving it a value not an address.