int func(int x, int y)
{
cout << "x = " << x << " , y = " << y << endl;
return x + y;
}
void main()
{
int a = 4;
int b = func(a--, ++a);
cout << "b = " << b << endl;
cout << "a = " << a << endl;
getchar();
}
输出结果为:
x = 5, y = 4
b = 9
a = 4
大家分析一下++,--运算到底是怎么进行的,谢谢各位!