Hi,
I had some of the issues referred to "lvalue required" in c++, but i could not find for my specific case.
I was trying to write a small code using "Type reference" concept.
Below is my simple code:
Code:
#include<iostream.h>
#include<conio.h>
int main()
{
clrscr();
int y1=5,y3=6;
int & y2 = y1;
cout << "y2 is "<< y2 <<endl<<" address of y2: "<< &y2 <<"\n";
&y2 = &y3;
cout << "y2 is "<< y2 <<endl<<" address of y2: "<< &y2 <<"\n";
getch();
return 0;
}
Now i get the error saying "lvaue required".
Could any one please help me on this?
anil