房间2003吧
关注: 2 贴子: 2

  • 目录:
  • 0
    1
    yhhy 2022-02
    #include<iostream> using namespace std; const int N = 100; int *p = new int[N]; int e[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; //void my_swap(int *x, int *y){ //int t; //t = *x; //*x = *y; //*y = t; //} void my_swap(int &x, int &y){ int t; t = x; x = y; y = t; } //void my_swap(char *x, char *y){ //char t; //t = *x; //*x = *y; //*y = t; //} void my_swap(int *p, int m){ for (int i = 0 ,j = m - 1 ; j>=i; i++,j--) my_swap(p[i], p[j]); } template<typename T> void my_swap(T *x,T *y) { T t; t = *x; *x = *y; *y = t; } int main(){ for (int i = 0; i < N; i++) p[i] = i+1; int a
    yhhy 2-25
  • 0
    亲爱的各位吧友:欢迎来到房间2003

  • 发贴红色标题
  • 显示红名
  • 签到六倍经验

赠送补签卡1张,获得[经验书购买权]

扫二维码下载贴吧客户端

下载贴吧APP
看高清直播、视频!

本吧信息 查看详情>>

会员: 会员

目录: