lvalue

why does it give an error saying lvalue required

1
2
3
4
5
6
7
8
9
  #include <iostream>
using namespace std;

int main(){
int i =3;
for(; i++=0;)
cout<<i;
}
Look at line 6. The error is... well, rather straightforward- you added an extra +. Also, this is an infinite loop, but you'll find that out once you fix the compile error.
Topic archived. No new replies allowed.