+ 1
explain me this please?
explain me this please? #include <iostream> using namespace std; int main() { int x = 4; int y= ++x; cout << y++<<y++<<y++<<"\n"<<++y; cout<<"\n"<< x++<<x++<<x++<<"\n"<<++x; return 0; } //post fix means using the variable first, then increment it but y++ is incrementing it first?same is with x ++ why does it happenning?, explain?
1 Antwoord
+ 8
I think you should write them in separated lines
such as :
cout<<y++;
cout<<++y;
//that will be clear for you ...