【cpp】new delete
double *M = new double[2*num];
double *T = new double[2 * num];
double *activeM = new double[2 * num];
double *activeT = new double[2 * num];
double *A = new double[2 * num];
delete[] A;
delete[] activeT;
delete[] activeM;
delete[] T;
delete[] M;
注意:
(1)对数组要 delete[]
(2)注意delete的顺序,和new是反过来的。