class A
{
};
void func()
{
A *p=new A[100]; //创建100 个对象
.
.
.
.
delete []p; // [] 号 一定要有的
}
int main()
{
char *p=new char[5];
strcpy(p,"DING");
CName one(p);
delete []p;
cout<
}
int *a=new int;
char *b=new char; //初值为1
int *c=new int[100]; //创建100个动态对象
delete a;
delete b;
delete []c;
A aa = new A[100];
delete[] aa;
能看懂吧?