您的位置:首页 > 编程语言 > C语言/C++

Question 42: A C++ developer wants to explicitly specialize the template function below for the char * type:

2010-12-03 10:45 771 查看
template <class T> void fn(T a){...}

Which of the following methods can the developer use to carry out this specialization?

A. void fn<char*>(char* a){...}
B. template <> void fn<char*>(char* a){...}
C. void fn<char*>(T a){...}
D. template <class T> void fn(char* a){...}
E. template <class T> void fn<char*>(T a){...}

B
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐