单项选择题
关于在调用模板函数时模板实参的使用,下列表述中正确的是______。
A.对于虚拟类型参数所对应的模板实参,如果能从模板函数的实参中获得相同的信息,则都可以省略
B.对于虚拟类型参数所对应的模板实参,如果它们是参数表中的最后的若干个参数,则都可以省略
C.对于虚拟类型参数所对应的模板实参,若能够省略则必须省略
D.对于常规参数所对应的模板实参,任何情况下都不能省略
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有如下程序: #include<iostream> using namespace std; class Instrument public: virtual void Display()=0; ; class Piano:public Instrument public: void Display() *函数体略* ; int main() Instrument s; Instrument*p=0; …; return 0; 下列叙述中正确的是______。
A.语句“Insturment*p=0;”编译时出错
B.语句“Instrument s;”编译时出错
C.类Piano中的Display函数不是虚函数
D.类Instrument是一个虚基类
点击查看答案&解析
单项选择题
有如下程序: #include<iostream> using namespace std; class Pair int m,n; public: Pair(int j,int k):m(j),n(k) int get()return m; int get()constreturn m+n; ; int main() Pair a(3,5); const Pair b(3,5); cout<<a.get()<<b.get(); return 0; 执行这个程序的输出结果是______。
A.33
B.38
C.83
D.88
点击查看答案&解析
相关试题
请使用VC6或使用[答题]菜单打开考生文件...
请使用VC6或使用[答题]菜单打开考生文件...
请使用VC6或使用[答题]菜单打开考生文件...
下列关于C++流的描述中,错误的是___...
在下列枚举符号中,用来表示“相对于当前位...