模板函数实现交换_折半查找_友元函数_运算符重载

模板的本质

模板函数实现交换

#include 

template<class T>
void myswap(T &l, T &r) {
   
    T tmp;
    tmp = r;
    r = l;
    l =<

你可能感兴趣的:(c++知识点总结及面试问答,C语言,C++学习笔记,算法,数据结构)