动态数组在 C++ 中是这样分配的。
int *arr = new int(5); int *arr = new int[5];
这些方式有什么区别?或者它们完全一样吗?
c++ dynamic-arrays
c++ ×1
dynamic-arrays ×1