标签:方法 name code bsp stream string out efi define
#include <iostream> #include <stdio.h> #include <string.h> #include <vector> using namespace std; #define swap1(x,y) x=x+y,y=x-y,x=x-y #define swap2(x,y) x^=y,y^=x,x^=y int main() { int a=1,b=2; //方法1 swap1(a,b); cout << "a=" << a << " b=" << b << endl; //方法2 a=1,b=2; swap2(a,b); cout << "a=" << a << " b=" << b << endl; }
标签:方法 name code bsp stream string out efi define
原文地址:http://www.cnblogs.com/linuxAndMcu/p/7501551.html