填空题
已知程序的结果为123,请填空。 #include<iostream.h> template<classT> classA { public: Tx,y,z; voiddisplay( ){cout<<x<<""<<y<<""<<z;= =; voidmain( ) { A<int>al; 【 】 【 】 【 】 al.display( ); =
【参考答案】
a1.x=1;
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
如果要把返回值为void的函数A声明为类B的友元函数,则应在类B的定义中加入的语句是【 】。
点击查看答案&解析
填空题
以下程序运行后的输出结果是_________。main(){ int a=1,b=2,c=3;if(c=a) printf( %d n ,c);else printf( %d n ,b);}
点击查看答案&解析
相关试题
静态成员函数可以直接访问类的【 】成员,...
cout.put(’’A’’);,还可以表示为【...
软件生命周期可分为多个阶段,一般分为定义...
继承的方式有公有继承、私有继承和【 】3种。
C++语句const char * const p= he...