I was just beginning to learn about references in C++, and i tried the following code:
#include <iostream>
using namespace std;
int main()
{
int ival = 1024;
int &refVal = ival;
// refVal refers to (is another name for) ival
cout<< &refVal<<endl;
return 0;
}
And it returning this number:
0x61feb8
I don't know what it is? Please also elaborate if you feel i am lacking some basic/very important knowledge here!
Aucun commentaire:
Enregistrer un commentaire