C++模板与STL库学习: 实现求最大值模板函数
- 实现求两个数最大值的模板函数:template
T max(T a, T b){ return (a > b) ? a : b; } 2. 在模板函数形参表中添加函数定义体。
445KB
文件大小:
评论区