CArray<bittt,bittt> char_temp;
其中的  char_temp[aaa].bitt是char*的指针我
char_temp[aaa].bitt = new char[10];可是我不能delete他,下面这句话就出错,怎么回事啊?
delete char_temp[aaa].bitt;

解决方案 »

  1.   

    aaa是不是也是动态的?
    delete [] char_temp[aaa].bitt;
      

  2.   

    aaa当然是动态的了。
    这样好像不行的。
      

  3.   

    删除数组用
    delete [] char_temp[aaa].bitt;祝你成功!
      

  4.   


    delete []char_temp[aaa].bitt;delete之前确保
    1:char_temp没有删除。
    2:char_temp[aaa].bitt还没有删除。
    3: char_temp与char_temp[aaa].bitt没有被过界使用过
      

  5.   

    检查char_temp[aaa].bitt new完之后又被赋值了没有(char_temp[aaa].bitt =……)?或者用char_temp[aaa].bitt 的过程中越界!
      

  6.   

    delete [] char_temp[aaa].bitt;