两者区别:
void swap(char &a, char &b){
a = a^b;
b = a^b;
a = a^b;
}
void swap(char *a, char *b){
a = a^b;
b = a^b;
a = a^b;
}
本文共 164 字,大约阅读时间需要 1 分钟。
两者区别:
void swap(char &a, char &b){
a = a^b;
b = a^b;
a = a^b;
}
void swap(char *a, char *b){
a = a^b;
b = a^b;
a = a^b;
}
转载于:https://blog.51cto.com/moonght/1267095