等号会首先将左边的赋值给右边,然后(有返回值!)返回左边的值,也就是和右边的值一样。
#include<iostream> using namespace std; int main(){ int a=1,b=2; cout<<(a=b); return 0; }
例如,该程序输出为2