C++ 用宏实现swap(a,b) #include <iostream>using namespace std;#define SWAP(a,b) a^=b,b^=a,a^=bint main(void){ int x = 2,y=3; SWAP(x,y); cout << x << ',' << y << endl; return 0... c/c++ 2023-09-23 150 点赞 2 评论 227 浏览