#include
#include
using namespace std;
template inline R MAX(T a,Y b)
{
return a>b?a:b;
}
int main()
{
cout<<MAX(1,2);
cout<<MAX(1,2.4); //有蟲子!!!!
}
【template】練習
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
流水線 YAML 高級用法來了!大幅降低重複代碼、靈活編排多任務
原創
2024-05-16 21:13:44
C++ 可變索引模板 和 template template
Erick_Lv
2020-07-04 04:09:11
設計模式 Template模式
DavidCao520
2020-07-01 21:01:55
NDK14_C++基礎:模板方法,模板類
鱼包子Ray
2020-06-29 16:42:21
DJango視圖(views)和模版(templates)的使用
fanlei5458
2020-06-29 08:18:37
MyArray數組筆記(模板的使用 )
秃鹫红发夜魔王
2020-06-24 06:46:50
使用template-web.js
使用template-web.js template-web.js,免費使用無需使用幣. 簡單使用: Document 查詢天氣 <div> <p id="cityname">城市名稱:</p
weixin_40550737
2020-06-23 08:25:41
C++中函數模板和類模板
yangxiao_xiang
2020-06-21 07:29:34
C++快讀模板
inline int read() { register int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') f
CN_BIT
2020-06-20 00:27:59
【C++心得分享】模板學習
「已注销」
2020-06-19 08:43:38
c++ 模板template 使用
somekoone
2020-06-17 10:41:47
Vue之循環v-for
清风自来&静等花开
2020-06-17 02:42:55