- 博客(5)
- 收藏
- 关注
原创 实验4.1
#include<iostream>#include<fstream>#include<cstring>using namespace std;class student{ public: int Id; string Name; string Sex; int Cj; ...
2018-05-10 20:40:00
145
原创 函数模板作为类模板成员
#include<iostream>#include<string>using namespace std;template <class T1,class T2>class Pair{ public: T1 key; T2 value; Pair(T1 k,T2 v):key(k),value(v){ ...
2018-04-24 17:45:44
513
2
原创 简单类模板
#include<iostream>#include<string>using namespace std;template <class T1,class T2>class Pair{ public: T1 key; T2 value; Pair(T1 k,T2 v):key(k),value(v){ ...
2018-04-24 17:37:17
197
原创 模板函数调用
#include<iostream>using namespace std;template <class t>t MAX(t a,t b){ cout<<"模板一被调用"<<endl; }template<class T1,class T2>T1 MAX(T1 a,T2 b){ cout<<"函数二
2018-04-24 17:18:02
4670
原创 函数模板的重载
#include<iostream>using namespace std;template <class T1,class T2>void Print(T1 arg1,T2 arg2){ cout<<arg1<<" "<<arg2<<endl; cout<<"模板一被调用
2018-04-24 17:06:54
199
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人