模板
摘要:1、定义函数模板 1 #include 2 #include 3 using namespace std; 4 5 template 6 int compare(const T &v1, const T &v2) 7 { 8 if(v1 inline T min(const T&, const T&);3 // error: incorrect placement f inline specifier4 inline template T min(const T&, const T&);定义多个模板形参: 1 /** 2 * 编写一个函数模板,接
阅读全文
posted @
2013-10-08 17:51
可笑痴狂
阅读(443)
推荐(0) 编辑