单项选择题

有如下程序:
#include<iostream>
using namespace std;
class Point
{
public:
static int number;
public:
Point()
{
number++;
}
~Point()
{
number--;
}
};
int Point::number=0;
void main()
{
Point *ptr;
Point A, B;
{
Point *ptr_point=new Point[3];
ptr=ptr_point;
}
Point C;
cout<<Point::number<<endl;
delete[]ptr;
}
程序的输出结果是______。

A.3
B.4
C.6
D.7
题目列表

你可能感兴趣的试题

微信扫码免费搜题