摘要:
#define swap(x,y) {int temp=x;x=y;y=temp;}//换行写法#define swap(x, y)\int temp = x;\x = y;\y = temp;#define swap(x,y) {x= x+y;y=x-y;x=x-y;}//换行写法#define swap(x,y)\x=x+y;\y=x-y;\x=x-y;\通过按位异或运算,可以实现两个值的交换,而不必使用临时变量void swap(int &a,int &b){ a=a^b; b=a^b; a=a^b;} 阅读全文
posted @ 2009-09-28 10:38
Hibernate4
阅读(264)
评论(0)
推荐(0)

浙公网安备 33010602011771号