全部博文(36)
分类: C/C++
2011-08-09 15:33:09
#include
#include
using namespace std;
template
void showMinMax()
{
cout << "min: " << numeric_limits
cout << "max: " << numeric_limits
cout << endl;
}
int main()
{
cout << "short: " << endl;
showMinMax
cout << "int: " << endl;
showMinMax
cout << "long: " << endl;
showMinMax
cout << "float" << endl;
showMinMax
cout << "double: " << endl;
showMinMax
cout << "long double: " << endl;
showMinMax
cout << "unsigned short: " << endl;
showMinMax
cout << "unsigned int: " << endl;
showMinMax
cout << "unsigned long: " << endl;
showMinMax
return 0;
}