![]() |
#2
rjsp2021-03-20 15:29
|
写了一个计数排序的算法?
int* count_arr = new int(k+1); 一直报错,提示超出
换成 int* count_arr = (int*)malloc(sizeof(int) * (k + 1)); 就可以了。
请问用new的话,应该怎么改?