摘要:
#include <iostream> using namespace std; void swap(int *& a, int *& b) { int * tmp = a; a = b; b = tmp; } int main() { int a = 3,b = 5; int * pa = & a 阅读全文
摘要:
#include <iostream> using namespace std; class A { public: int x; int getX() { return x; } }; void swap(A & a,A & b) { int tmp = a.x; a.x = b.x; b.x = 阅读全文