I've compiled the following program in VC++ environment. I've got an error "error C2105: '++' needs l-value" in line 6. Why am I getting this error? What is l-value? Why am I not getting the same error in line 5?
#include <iostream.h>
void main()
{
int i=2;
++++i; --------line 5
i++++; --------line 6
cout<<i;
}
Thank You,
Sincerely,
Uday