?? main.cpp
字號:
#include <stdio.h>
template <class T>
void func(T a){
printf("使用func(T a)模板\n");
}
//函數(shù)模板的重載
template<class T1, class T2>
int func(T1 t1, T2 t2){
printf("使用func(T1 t1, T2 t2)模板\n");
return 1;
}
int main(void){
func(30, 60); //使用重載的函數(shù)模板
func(19);
return 0;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -