更多"在下面横线上填上适当的语句,完成程序。 #include <iost"的相关试题:
[填空题]在下面横线上填上适当的语句,完成程序。
#include <iostream>
using namespace std;
class Base
int x;
public:
Base(int i) x=i;
~Base( )
;
class Derived: public Base
public:
______∥完成类 Derive 构造函数的定义
;
int main( )
Derived Obj;
return 0;
在横线处应填入的语句是 【11】 。
[填空题]在下面横线上填上适当的语句,完成程序。
#include <iostream>
using namespace std;
class Base
int x;
public:
Base(int i)x=i;
~Base( )
;
class Derived: public Base
public:
______ //完成类Derive构造函数的定义
;
int main( )
Derived Obj( );
return 0;
[填空题]在下面横线上填上适当的语句,完成程序。
#include <iostream>
using namespace std;
class Base
int x;
public:
Base(int i) x=i;
~Base( )
;
class Derived : public Base
public:
____________ //完成类 Derive 构造函数的定义
;
int main( )
Derived obj;
return 0;
在横线处应填入的语句是 【14】 。
[填空题]在下面横线上填上适当的语句,完成程序。
#include<iostream>
using namespace std;
class Base
int x;
public:
Base(int i)x=i;
~Base( )
;
class Derived : public Base
public:
【10】 /完成类Derive构造函数的定义
;
int main ( )
Derived Obj;
return 0;
[填空题]在下面横线上填上适当的语句,完成程序。
#include <iostream>
using namespace std;
class Base
{
int x:
public:
Base (int i){x=i;}
~Base( ){}
};
class Derived : public Base
{
public:
______ //完成类Derive构造函数的定义
};
int main (
{
Derived Obi;
return 0;
}
在横线外应填入的语句是______。
[填空题]在下面横线上填上适当的语句,完成程序。
#include <iostream>
using namespace std;
class Base
{
int x;
public:
Base(int i) { x=i;}
~Base( ){}
};
class Derived: public Base
{
public:
______∥完成类 Derive构造函数的定义
};
int main( )
{
Derived Obj;
return 0;
}
在横线处应填入的语句是 【9】 。