Qsorting 2d pointer arrays
问题 I'm trying to sort a 2d array of pointers using qsort. The only issue I have right now is originally I was using statically declared arrays now switching over to pointers. I'm almost tempted to switch to structs but being stubborn that I can't get this to work. So far I malloc the 2d array of pointers[array2d[m][3] was the intended size]: int **array2d; array2d = (int**)malloc((m)*sizeof(int*)); for(i=0; i<=m; i++) array2d = [i]=(int*)malloc(3*sizeof(int)); qsort(array2d, m, 3*sizeof(int**)