class A
{
public:
A()
cout<<"C-A"<<endl;
}
~A()
cout<<"D-A"<<endl;
};
int main() {
A *p=new A[3];
delete p;
output
C-A
D-A
delete [] p;
No comments:
Post a Comment