为什么函数参数直接写int a,int b不行?
#include
using namespace std; void fun(int a, int b) { int c = 0; c = a; a = b; b = c; } int main() { int x = 10; int y = 20; cout << x << "," << y << endl; fun(x, y); cout << x << "," << y << endl; system("pause"); return 0; }为什么直接int a和int b不行?