题目内容

如果有如下函数模板的定义:template T func(T x,T y){return x+y;}则对函数func调用不正确的是( )。

A. func(3,5);
B. func<>(3,5)
C. func(3,2.5)
D. func(3,2.5);

查看答案
更多问题

下列对模板的声明错误的是( )。

A. template
B. template
C. template < class T1, class T2 >
D. template < class T1;class T2>

模板可以实现程序设计中的_________,体现了面向对象程序设计的__________。

C++模板可以分为_____和___。

由函数模板实例化后是_____;由类模板实例化后是_____。

答案查题题库