单选题
下列函数模板定义中错误的是
A、
template<class Q>
B、
template<class Q>
Q F(Q x)return Q+x; Q F(Q x)return x+x;
C、
template<class T>
D、
template<class T>
T F(T x)return x * x; bool F(T x)return x>1;
【正确答案】
A
【答案解析】
[解析] 在函数模板定义中,类型参数不能参与运算。
提交答案
关闭