My question is "Is return arr[n] returning the address of arr[n]?",If so then why does the cout print the values rather than address?Code:class array
{
int arr[3];
public:
int &access(int n)
{
return arr[n];
}
};
int main()
{
array a;
for(int i=0;i<3;i++)
cin>>a.access(i);
for(int i=0;i<3;i++)
cout<<a.access(i)<<endl;
cin.get();
}