CArray<bittt,bittt> char_temp;
其中的 char_temp[aaa].bitt是char*的指针我
char_temp[aaa].bitt = new char[10];可是我不能delete他,下面这句话就出错,怎么回事啊?
delete char_temp[aaa].bitt;
其中的 char_temp[aaa].bitt是char*的指针我
char_temp[aaa].bitt = new char[10];可是我不能delete他,下面这句话就出错,怎么回事啊?
delete char_temp[aaa].bitt;
delete [] char_temp[aaa].bitt;
这样好像不行的。
delete [] char_temp[aaa].bitt;祝你成功!
delete []char_temp[aaa].bitt;delete之前确保
1:char_temp没有删除。
2:char_temp[aaa].bitt还没有删除。
3: char_temp与char_temp[aaa].bitt没有被过界使用过