『代码』··By/蜜汁炒酸奶

函数模板之compare比较大小—C++

/*
功能:编写一个函数模版compare
作者:wind
日期:2013-12-11
*/
#include <iostream>
using namespace std;
template<typename T>
bool Compare(T a,T b)
{
	if (a==b)
	{
		return true;
	}
	else
	{
		return false;
	}
}
int main(void)
{



	system("pause");
	return 0;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

预览
Loading comments...
0 条评论

暂无数据

example
预览