📄 main.cpp
字号:
#include <stdio.h>
template <class T>
void func(T a){
printf("hello\n");
}
//函数模板完全特化
template<>
void func<int>(int a){
printf("hello there\n");
}
int main(void){
func(2); //打印hello there
func('y'); //打印hello
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -