函數模板以及實例化

#include<iostream> using namespace std; template<class T1,class T2> T1 sum(T1 x, T2 y) { return x+y; } template<class T1,class T2,int z> T1 csum(T1 x,T1 y) { return x+y+z; } int main() { //隱式實例化 cout<
相關文章
相關標籤/搜索