#include <iostream>
using namespace std;
int cnt = 0;
int show()
{
cnt = 9;
return 0;
}
int main()
{
cout << show() << ', ' << cnt << endl; // 输出 0, 0
return 0;
}
// 由于cout压栈,是从右到左,所以输出cnt为0
函数参数压栈从右到左
最新推荐文章于 2024-07-27 12:40:00 发布