It’s recommended to use: double * data = new double[mysize];
in C++ rather than the C-way: double * data = (double *)malloc(sizeof(double)*mysize);
How about the one corresponds to calloc( )
? Short memo here:
double * data = new double[mysize]();
Search the internet for more details if you are interested …