????1. ????
??????????????????????windows????????????????????????????????δ?????????????o????????????????????????????????
struct sample
{
int* ptr_table[4][4];
//... other members
};
void test()
{
sample* sample_ptr = new sample[10];
for (int i = 0; i < 4; i++)
sample_ptr[0].ptr_table[0][i] = new int(i);
// ?????????????????????sample_ptr?????е??????и?????????????е?????г????????;
int* int_ptr = sample_ptr[0].ptr_table[0][0];
if (int_ptr != NULL)
{
printf("ptr1 = 0x%x "?? int_ptr);
*int_ptr = 100;
}
int_ptr = sample_ptr[1].ptr_table[0][0];
if (int_ptr != NULL)
{
printf("ptr2 = 0x%x "?? int_ptr);
*int_ptr = 100; // crashed here!
}
}

??????sample* sample_ptr = new sample[10]???и??sample* sample_ptr = new sample[10]()??????????е?????????????????????????檔
????????????????
????(1) ???????????(new sample[10])?????????±??????????????????????????????????????????????
????(2) new sample[10]??new sample[10]()??????????????