/*using bit swap^=xor00 = 001 = 110 = 111 = 0!(x^y);x==y;*/void inplace_swap(int *x, int *y){//x=x, y=x^y*y = *x ^ *y;//x=x^x^y, y=x^y*x = *x ^ *y;//x=x, y=x^y^y*y = *x ^ *y;}
반응형
'프로그래밍' 카테고리의 다른 글
Hello World (0) | 2017.11.09 |
---|---|
WinForm을 이용한 가위바위보 (0) | 2017.11.09 |
VRProject 3차 (0) | 2017.08.22 |
VRProject 2차 (0) | 2017.08.15 |
VRProject 1차 (0) | 2017.08.08 |