📌  相关文章
📜  如何动态分配数组 c++ 代码示例

📅  最后修改于: 2022-03-11 14:44:46.240000             🧑  作者: Mango

代码示例1
int* a = NULL;   // Pointer to int, initialize to nothing.
int n;           // Size needed for array
cin >> n;        // Read in the size
a = new int[n];  // Allocate n ints and save ptr in a.
for (int i=0; i