mey*_*our 0 c++ operator-keyword
我读过加号运算符将其右值添加到其左值中。例如,如果我们编写x + 1;加号运算符x,在内存中查找变量并添加1到其中。
但是这个运算符不是这样工作的,因为在下面的代码中,它不会添加1到它的左值 ( x)。
int x = 4;
x + 1;// now the + operator adds 1 to x variable.
std::cout << x << std::endl;// this line must print 5 but doesn't.
Run Code Online (Sandbox Code Playgroud)
如果它不工作,就像我怎么解释,那怎么不工作?