class test {
public:
int *num[100];
test()
{
for (int i = 0; i < 100; i++)
num[i] = new int[12345];
}
~test()
{
for (int i = 0; i < 100; i++)
delete [] num[i];
}
};
int main()
{
test *pt;
// new
pt = new test;
// use
;
// delete
delete pt;
return 0;
}
Y2xhc3MgdGVzdCB7CiAgcHVibGljOgogICAgaW50ICpudW1bMTAwXTsKICAgIHRlc3QoKQogICAgewogICAgICAgIGZvciAoaW50IGkgPSAwOyBpIDwgMTAwOyBpKyspCiAgICAgICAgICAgIG51bVtpXSA9IG5ldyBpbnRbMTIzNDVdOwogICAgfQogICAgfnRlc3QoKQogICAgewogICAgICAgIGZvciAoaW50IGkgPSAwOyBpIDwgMTAwOyBpKyspCiAgICAgICAgICAgIGRlbGV0ZSBbXSBudW1baV07CiAgICB9Cn07CgppbnQgbWFpbigpCnsKICAgIHRlc3QgKnB0OwoKICAgIC8vIG5ldwogICAgcHQgPSBuZXcgdGVzdDsKICAgIC8vIHVzZQogICAgOwogICAgLy8gZGVsZXRlCiAgICBkZWxldGUgcHQ7CgogICAgcmV0dXJuIDA7Cn0K