单项选择题
有如下函数模板: template
T cast(Uu){return u;} 其功能是将U类型数据转换为T类型数据。已知i为int型变量,下列对模板函数cast的调用中正确的是( )。
A.cast(i);
B.cast<>(i);
C.cast<CHAR*, int>(i);
D.cast<DOUBLE,INT>(i);
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有3个结点的二叉树有()。
A.2种形态
B.4种形态
C.7种形态
D.5种形态
点击查看答案&解析
填空题
下面程序运行时输出结果为______。 #include<iostream.h> #include class Rect { public: Rect(int l, int w){length=l; width=w;) void Print(){cout<< Area: <<length*width<<end1;} void operator delete(void*p){free(p);} private: int length, width; }; void main() { Rect *p; p=new Rect(5, 4); p->Print(); delete p; }
点击查看答案&解析
相关试题
以下程序的执行结果是______。#incl...
有如下类声明:class MyClass{int i;pr...
若下面程序运行时输出结果为:1,A,10...
下列函数的功能是判断字符串str是否对称,...
有如下程序:#include<iostream>using ...