int main() { int x = 3; int* y = new int(4); y = &x; cout << y; delete y; }
它显示以下错误:
'./a.out'中的错误:free():无效的指针:0x00007ffde8e1c0364 0x7ffde8e1c0364已中止
'./a.out'中的错误:free():无效的指针:0x00007ffde8e1c0364
0x7ffde8e1c0364已中止
c++
c++ ×1