模板
文章平均质量分 50
冇得闲
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
函数模板的简单使用
#include using namespace std;inline int const & max(int const & a, int const & b){ cout << "inline int const & max\n"; return a > b ? a : b;}template inline T const & max(T const & a,原创 2012-03-08 22:48:29 · 576 阅读 · 0 评论 -
模板的使用 二
#include #include #include #include #include "Stack.h"using namespace std;templateT const & max(T const & a, T const & b){//这是个有隐患的函数模板 return a > b ? a : b;}template void ref(T cons原创 2012-03-09 22:13:28 · 584 阅读 · 0 评论
分享