填空题 C++
题号 #145196

下列程序的输出结果为 
Object id=0  
Object id=1  
请将程序补充完整。  
#include  
using namespace std; 
class Point  
{ 
public:  
Point(int xx=0, int yy=0) {X=xx; Y=yy; countP++; }  
~Point( ) { countP--; }  
int GetX( ) {return X;}  
int GetY( ) {return Y;}  
static void GetC( ) {cout <<" Object id="<< 
private:  
int X,Y;  
static int countP;  
};(9)//静态数据成员的初始化  
int main( )  
{ 
Point::GetC( );  
Point A(4,5);  
A.GetC( );  
return 0;  
}

进入在线模考

参考答案

暂无

答案解析

int point::count p=0

你可能感兴趣的试题

找试题 · 找答案 · 找资料 在线模考