Quote (MnG @ May 29 2014 08:50am)
//Taken from
http://www.cplusplus.com/doc/tutorial/operators/Assignment operator (=)
The assignment operator assigns a value to a variable.
x = 5;
This statement assigns the integer value 5 to the variable x. The assignment operation always takes place from
right to left, and never the other way around
//The above seems very confusing to me, I read x = 5; as x
is now 5 not 5
is now x
//When the site says never the other way around what does it mean? I read left to right and it seems to give the same result (including the examples they give).
//Can someone post an example showing what they mean by you read it right to left? It looks the same to me

Quote (MnG @ May 30 2014 01:15am)
Which is what is confusing, when they say ALWAYS read from right to left, is it not the same exact thing?
perhaps two variables instead of variable + constant would help you?
Code
int y = 0;
int x = 1;
y = x;
Code
int y = 0;
int x = 1;
x = y;
tell me what you think x and y are for each code snippet.