template的简单例子
来源:互联网 发布:C语言中感叹号 编辑:程序博客网 时间:2024/05/18 02:34
- #include<iostream>
- using namespace std;
- template <class T>
- int compare(const T &v1,const T &v2)
- {
- if(v1==v2)
- return 0;
- if(v1>v2)
- return -1;
- if(v1<v2)
- return 1;
- }
- void main()
- {
- cout<<compare(10,5)<<endl;
- cout<<compare(3.14,9.12)<<endl;
- }
- template的简单例子
- template.js简单使用例子
- [C/C++]_[简单例子看模板template的特性]
- c++ template 的一个例子
- 简单的C++ template实例
- Golang简单的template使用
- Template Method模式的一个例子
- 模板方法模式(Template Method)c#简单例子
- 关于C++中template的简单用法
- c++ template 实现一个简单的"栈"
- django template 例子
- heat template例子
- 模板template和宏定义define一起的例子
- 简单的Timer例子
- c的简单例子
- AJAX的简单例子
- 一个简单的例子
- 重载的例子.....简单
- 初探SQL Server 2008性能和扩展
- 和top沾边的“牛人”
- 求职被拒怎么办
- 计算机核心刊物投稿经验
- 初探SQL Server 2008管理能力
- template的简单例子
- 详解SQL Server 2008中的管理能力
- Oracle 9i 的安装(图解)
- 关于CBitmap的使用
- Java语言的26个细节(1)
- 使用SQL Server 2008进行服务器合并
- 有人用shedskin给一个AI程序加速,结果是196倍的效率提升
- apt-get 使用指南
- 解读SQL Server 2008中性能和可扩展性