如果我有一个结构:
typedef struct {
unsigned char data[HEX_FLASH_BUFFER];
bool isLoad;
unsigned int length;
} s_hexFLASH;
typedef struct {
s_hexFLASH flash;
} s_hexFile;
s_hexFile *hex = new s_hexFile;
如何删除整个结构?因为当 a 做了这样的事情时:
delete[] hex->flash.data;
在此之后我仍然能够读取数据:
cout << hex->flash.data[0] << endl;