65,189
社区成员




#include <iostream>
using namespace std;
class AB
{
public:
AB(){}
~AB()
{
cout << "end.." << endl;
}
};
void main()
{
AB a,b;
AB x[2] = {a,b};
AB* px = x;
delete[] px;
}
#include <iostream>
using namespace std;
class AB
{
public:
AB(){}
~AB()
{
cout << "end.." << endl;
}
};
void main()
{
AB a,b;
AB x[2] = {a,b};
AB* px = x;
int aa=1,bb=2;
int cc[2] = {aa,bb};
cout << cc[0] << endl;
cout << cc[1] << endl;
//delete[] px;
}