看板 NUU_CSIE 關於我們 聯絡資訊
template <class T, class U> 和 template <class T> template <class U> 差別在哪裡ˊˋ 為什麼這樣寫可以過: template <class T, class U> void show(T a, U b) { ... ... } 這樣寫就不能過: template <class T> template <class U> void show(T a, U b) { ... ... } 哭哭 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.118.49.83
tuzr:小聲說:我不會template,跟enum...(哭著跑開...) 03/08 12:59
godman362:enum我也只有知道...但是實際用起來還沒試過 03/08 13:10
godman362:我急著要答案啦 囧 沒有找到類似的資料啦 機車 03/08 13:10
tuzr:我好奇,如果把下面的void show分兩個呢?一個T 一個U... 03/08 13:16
godman362:你是說: show (T a, Tb) show (U a, U b)嗎 03/08 13:23
godman362:沒救喔....compile不會給你過 03/08 13:23
godman362:ㄋㄞ他都沒用,compile一點都不nice 03/08 13:23